Merge branch 'master' of github.com:JakeGinesin/nix-dots
This commit is contained in:
22
README.md
22
README.md
@@ -1,3 +1,25 @@
|
|||||||
|
uhuh yeah endgame nixos config
|
||||||
|
|
||||||
|
# Install
|
||||||
|
if you're me, you need to bootstrap your secrets for agenix to work right:
|
||||||
|
```
|
||||||
|
cp -r /home/sync/.ssh /mnt/home/sync/.ssh
|
||||||
|
cp /home/sync/Passwords.kdbx /mnt/home/sync/.config/keep
|
||||||
|
```
|
||||||
|
if you're not me, you probably have to go in my config and change things for nix to build everything.
|
||||||
|
|
||||||
|
then, proceed with regular installation:
|
||||||
|
```
|
||||||
|
sudo nixos-install --root /mnt --flake github:jakeginesin/nix-dots#thonkpad
|
||||||
|
```
|
||||||
|
And rebuild with:
|
||||||
|
```
|
||||||
|
sudo nixos-rebuild switch --flake.#thonkpad
|
||||||
|
```
|
||||||
|
|
||||||
# Some crazy dotfiles
|
# Some crazy dotfiles
|
||||||
- [Sylk0s](https://github.com/sylk0s/dotfiles)
|
- [Sylk0s](https://github.com/sylk0s/dotfiles)
|
||||||
- [Cajunvoodoo's](https://github.com/Cajunvoodoo/dotfiles)
|
- [Cajunvoodoo's](https://github.com/Cajunvoodoo/dotfiles)
|
||||||
|
- [damhiya](https://github.com/damhiya)
|
||||||
|
- [masterofnull](https://github.com/MasterofNull/nixos)
|
||||||
|
- [hlissner](https://github.com/hlissner/dotfiles) (also uses bspwm)
|
||||||
|
|||||||
@@ -1,217 +0,0 @@
|
|||||||
# Edit this configuration file to define what should be installed on
|
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkg_with_working_nitrogen = import (builtins.fetchTarball {
|
|
||||||
url = "https://github.com/NixOS/nixpkgs/archive/c0c50dfcb70d48e5b79c4ae9f1aa9d339af860b4.tar.gz";
|
|
||||||
sha256 = "17p3w4mgfr4yj2p0jz6kqgzhyr04h4fap5hnd837664xd1xhwdjb";
|
|
||||||
}) {inherit (pkgs) system;};
|
|
||||||
|
|
||||||
old-nitrogen = pkg_with_working_nitrogen.nitrogen;
|
|
||||||
in {
|
|
||||||
imports = [
|
|
||||||
# ./hardware-configuration.nix
|
|
||||||
./system/system.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# Bootloader.
|
|
||||||
boot.loader.grub.enable = true;
|
|
||||||
boot.loader.grub.device = "/dev/nvme0n1";
|
|
||||||
boot.loader.grub.useOSProber = true;
|
|
||||||
|
|
||||||
networking.hostName = "thonkpad"; # Define your hostname.
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
|
|
||||||
nix = {
|
|
||||||
nixPath = [
|
|
||||||
"nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos"
|
|
||||||
"nixos-config=/home/synchronous/nix-cfg/configuration.nix"
|
|
||||||
"/nix/var/nix/profiles/per-user/root/channels"
|
|
||||||
];
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
experimental-features = ["nix-command" "flakes"];
|
|
||||||
substituters = [
|
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Enable networking
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "America/New_York";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "en_US.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
|
||||||
LC_MEASUREMENT = "en_US.UTF-8";
|
|
||||||
LC_MONETARY = "en_US.UTF-8";
|
|
||||||
LC_NAME = "en_US.UTF-8";
|
|
||||||
LC_NUMERIC = "en_US.UTF-8";
|
|
||||||
LC_PAPER = "en_US.UTF-8";
|
|
||||||
LC_TELEPHONE = "en_US.UTF-8";
|
|
||||||
LC_TIME = "en_US.UTF-8";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
services.printing.enable = true;
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
# If you want to use JACK applications, uncomment this
|
|
||||||
#jack.enable = true;
|
|
||||||
|
|
||||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
|
||||||
# no need to redefine it in your config for now)
|
|
||||||
#media-session.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
|
||||||
# services.xserver.libinput.enable = true;
|
|
||||||
|
|
||||||
users.users.synchronous = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "jake";
|
|
||||||
extraGroups = ["networkmanager" "wheel"];
|
|
||||||
packages = with pkgs; [
|
|
||||||
kdePackages.kate
|
|
||||||
# firefox
|
|
||||||
git
|
|
||||||
arandr
|
|
||||||
procs
|
|
||||||
htop
|
|
||||||
zsh
|
|
||||||
ripgrep
|
|
||||||
rofi
|
|
||||||
alacritty
|
|
||||||
python3
|
|
||||||
tree
|
|
||||||
old-nitrogen
|
|
||||||
polybar
|
|
||||||
sxhkd
|
|
||||||
bspwm
|
|
||||||
# librewolf
|
|
||||||
eza
|
|
||||||
flameshot
|
|
||||||
neofetch
|
|
||||||
lolcat
|
|
||||||
nnn
|
|
||||||
xclip
|
|
||||||
brightnessctl
|
|
||||||
xbindkeys
|
|
||||||
pulseaudio
|
|
||||||
xorg.xf86inputsynaptics
|
|
||||||
libnotify # for notify-send
|
|
||||||
alejandra
|
|
||||||
discord
|
|
||||||
legcord
|
|
||||||
polybar-pulseaudio-control
|
|
||||||
bluez # polybar
|
|
||||||
zotero
|
|
||||||
texliveFull
|
|
||||||
texlivePackages.latexmk
|
|
||||||
nmap
|
|
||||||
procps # for pgrep
|
|
||||||
# xorg.xrandr
|
|
||||||
# thunderbird
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
security.sudo = {
|
|
||||||
# me ne frego. i dare you to privilege escalate me
|
|
||||||
enable = true;
|
|
||||||
extraRules = [
|
|
||||||
{
|
|
||||||
commands = [
|
|
||||||
{
|
|
||||||
command = "/home/synchronous/nix-cfg/home/scripts/nixos-rebuild.sh";
|
|
||||||
options = ["NOPASSWD"];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
command = "/home/synchronous/.scripts/nixos-rebuild.sh";
|
|
||||||
options = ["NOPASSWD"];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
# are you serious?
|
|
||||||
command = "/run/current-system/sw/bin/nixos-rebuild switch --flake /home/synchronous/nix-cfg/flake.nix";
|
|
||||||
options = ["NOPASSWD"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
users = ["synchronous"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Allow unfree packages
|
|
||||||
# nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
vim
|
|
||||||
neovim
|
|
||||||
linux-manual
|
|
||||||
man-pages
|
|
||||||
man-pages-posix
|
|
||||||
fontconfig
|
|
||||||
python3
|
|
||||||
rofi
|
|
||||||
flameshot
|
|
||||||
tree
|
|
||||||
# nitrogen
|
|
||||||
polybar
|
|
||||||
sxhkd
|
|
||||||
bspwm
|
|
||||||
# librewolf
|
|
||||||
];
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
# programs.gnupg.agent = {
|
|
||||||
# enable = true;
|
|
||||||
# enableSSHSupport = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
# services.openssh.enable = true;
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
# networking.firewall.enable = false;
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
||||||
# this value at the release version of the first install of this system.
|
|
||||||
# Before changing this value read the documentation for this option
|
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
||||||
system.stateVersion = "24.11"; # Did you read the comment?
|
|
||||||
}
|
|
||||||
119
flake.lock
generated
119
flake.lock
generated
@@ -1,35 +1,81 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-parts": {
|
"agenix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"darwin": "darwin",
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733312601,
|
"lastModified": 1745630506,
|
||||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
"narHash": "sha256-bHCFgGeu8XjWlVuaWzi3QONjDW3coZDqSHvnd4l7xus=",
|
||||||
"owner": "hercules-ci",
|
"owner": "ryantm",
|
||||||
"repo": "flake-parts",
|
"repo": "agenix",
|
||||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
"rev": "96e078c646b711aee04b82ba01aefbff87004ded",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "hercules-ci",
|
"owner": "ryantm",
|
||||||
"repo": "flake-parts",
|
"repo": "agenix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"darwin": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"agenix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1744478979,
|
||||||
|
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
|
||||||
|
"owner": "lnl7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "lnl7",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "nix-darwin",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
"agenix",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1734622215,
|
"lastModified": 1745494811,
|
||||||
"narHash": "sha256-OOfI0XhSJGHblfdNDhfnn8QnZxng63rWk9eeJ2tCbiI=",
|
"narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "1395379a7a36e40f2a76e7b9936cc52950baa1be",
|
"rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1745703610,
|
||||||
|
"narHash": "sha256-KgaGPlmjJItZ+Xf8mSoRmrsso+sf3K54n9oIP9Q17LY=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "2f5819a962489e037a57835f63ed6ff8dbc2d5fb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -40,37 +86,56 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1734424634,
|
"lastModified": 1745391562,
|
||||||
"narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
|
"narHash": "sha256-sPwcCYuiEopaafePqlG826tBhctuJsLx/mhKKM5Fmjo=",
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
|
"rev": "8a2f738d9d1f1d986b5a4cd2fd2061a7127237d7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733096140,
|
"lastModified": 1745526057,
|
||||||
"narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=",
|
"narHash": "sha256-ITSpPDwvLBZBnPRS2bUcHY3gZSwis/uTe255QgMtTLA=",
|
||||||
"type": "tarball",
|
"owner": "NixOS",
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
|
"repo": "nixpkgs",
|
||||||
|
"rev": "f771eb401a46846c1aebd20552521b233dd7e18b",
|
||||||
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"owner": "NixOS",
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"agenix": "agenix",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager_2",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
129
flake.nix
129
flake.nix
@@ -1,102 +1,53 @@
|
|||||||
{
|
{
|
||||||
description = "Nixos config flake";
|
description = "NixOS system configuration";
|
||||||
|
|
||||||
|
nixConfig = {
|
||||||
|
# substituters = [
|
||||||
|
# "https://cache.nixos.org/"
|
||||||
|
# "https://nix-community.cachix.org"
|
||||||
|
# ];
|
||||||
|
# trusted-public-keys = [
|
||||||
|
# "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
|
# "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
# ];
|
||||||
|
};
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
agenix.url = "github:ryantm/agenix";
|
||||||
# haumea = {
|
|
||||||
# url = "github:nix-community/haumea/v0.2.2";
|
|
||||||
# inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ {
|
outputs = {
|
||||||
flake-parts,
|
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
...
|
home-manager,
|
||||||
}:
|
agenix,
|
||||||
flake-parts.lib.mkFlake {
|
}: let
|
||||||
inherit inputs;
|
baseModule = {
|
||||||
} {
|
# imports = [
|
||||||
imports = [];
|
# home-manager.nixosModules.default
|
||||||
|
# ];
|
||||||
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
|
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
||||||
perSystem = {
|
nixpkgs.overlays = [];
|
||||||
config,
|
|
||||||
self,
|
|
||||||
inputs,
|
|
||||||
system,
|
|
||||||
nixpkgs,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
# Per-system attributes can be defined here. The self' and inputs'
|
|
||||||
# module parameters provide easy access to attributes of the same
|
|
||||||
# system.
|
|
||||||
|
|
||||||
# Equivalent to inputs'.nixpkgs.legacyPackages.hello;
|
|
||||||
# packages.default = pkgs.hello;
|
|
||||||
# formatter = pkgs.nixfmt-rfc-style;
|
|
||||||
|
|
||||||
formatter = pkgs.alejandra;
|
|
||||||
};
|
|
||||||
flake = {
|
|
||||||
# The usual flake attributes can be defined here, including system-
|
|
||||||
# agnostic ones like nixosModule and system-enumerating ones, although
|
|
||||||
# those are more easily expressed in perSystem.
|
|
||||||
# nixosConfigurations.myhostname = "thonkpad";
|
|
||||||
nixosConfigurations.thonkpad = inputs.nixpkgs.lib.nixosSystem rec {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
pkgs = import inputs.nixpkgs {
|
|
||||||
inherit system;
|
|
||||||
|
|
||||||
config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
packageOverrides = pkgs: {
|
|
||||||
# "package" = pkgs."package".overrideAttrs (attrs: {...})
|
|
||||||
};
|
|
||||||
};
|
|
||||||
overlays = [];
|
|
||||||
|
|
||||||
# home.packages = with pkgs; [xrandr procps polybar bspwm sxhkd polybar-pulseaudio-control bluez];
|
|
||||||
};
|
|
||||||
|
|
||||||
specialArgs = {inherit inputs;};
|
|
||||||
# extraSpecialArgs = {inherit inputs;};
|
|
||||||
modules = [
|
|
||||||
./configuration.nix
|
|
||||||
# self.module
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.users.synchronous = import ./home/home.nix;
|
|
||||||
home-manager.extraSpecialArgs = {inherit inputs;};
|
|
||||||
home-manager.backupFileExtension = "hm-backup";
|
|
||||||
|
|
||||||
# Optionally, use home-manager.extraSpecialArgs to pass
|
|
||||||
# arguments to home.nix
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# outputs = { self, nixpkgs, ... }@inputs: {
|
|
||||||
# nixosConfigurations.default = nixpkgs.lib.nixosSystem {
|
|
||||||
# specialArgs = {inherit inputs;};
|
|
||||||
# modules = [
|
|
||||||
# ./configuration.nix
|
|
||||||
# # inputs.home-manager.nixosModules.default
|
|
||||||
# { home-manager.users.synch = import ./home.nix; }
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
|
in {
|
||||||
|
nixosConfigurations.thonkpad = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
baseModule
|
||||||
|
{
|
||||||
|
environment.systemPackages = [agenix.packages.x86_64-linux.default];
|
||||||
|
}
|
||||||
|
home-manager.nixosModules.default
|
||||||
|
agenix.nixosModules.default
|
||||||
|
# agenix.homeManagerModules.age
|
||||||
|
./hosts/thonkpad/configuration.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,12 +24,18 @@ in {
|
|||||||
|
|
||||||
home.stateVersion = "24.11"; # Please read the comment before changing.
|
home.stateVersion = "24.11"; # Please read the comment before changing.
|
||||||
|
|
||||||
|
# age.secrets.zsh_remote.file = ../secrets/zsh_remote.age;
|
||||||
|
# age.secretsDir = "/home/synchronous/.agenix/agenix";
|
||||||
|
# age.secretsMountPoint = "/home/synchronous/.agenix/agenix.d";
|
||||||
|
# age.identityPaths = ["/home/synchronous/.ssh/id_ed25519"];
|
||||||
|
|
||||||
# home.packages = with pkgs; [xrandr procps polybar bspwm sxhkd polybar-pulseaudio-control bluez];
|
# home.packages = with pkgs; [xrandr procps polybar bspwm sxhkd polybar-pulseaudio-control bluez];
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
HOME = "/home/synchronous";
|
HOME = "/home/synchronous";
|
||||||
XDG_CACHE_HOME = "$HOME/.cache";
|
XDG_CACHE_HOME = "$HOME/.cache";
|
||||||
|
DBUS_SESSION_BUS_ADDRESS = "unix:path=$XDG_RUNTIME_DIR/bus";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
@@ -45,6 +51,8 @@ in {
|
|||||||
beets
|
beets
|
||||||
netcat
|
netcat
|
||||||
zathura
|
zathura
|
||||||
|
keepassxc
|
||||||
|
sshpass
|
||||||
]
|
]
|
||||||
++ (
|
++ (
|
||||||
with lib; let
|
with lib; let
|
||||||
@@ -64,4 +72,10 @@ in {
|
|||||||
(builtins.readFile file)
|
(builtins.readFile file)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# home.file.".profile".text = ''
|
||||||
|
# if [ -f "$HOME/.scripts/res.sh" ]; then
|
||||||
|
# . "$HOME/.scripts/res.sh"
|
||||||
|
# fi
|
||||||
|
# '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,9 +10,10 @@ pgrep -x sxhkd > /dev/null || sxhkd &
|
|||||||
|
|
||||||
# xrandr --output eDP-1 --mode 1920x1080 --primary
|
# xrandr --output eDP-1 --mode 1920x1080 --primary
|
||||||
# xrandr --output HDMI-1 --mode 1920x1080 --same-as eDP-1 --scale 1x1
|
# xrandr --output HDMI-1 --mode 1920x1080 --same-as eDP-1 --scale 1x1
|
||||||
xrandr --output eDP-1 --scale 1x1 --auto
|
# xrandr --output eDP-1 --scale 1x1 --auto
|
||||||
|
xrandr --output LVDS-1 --mode 1366x768 --primary
|
||||||
|
|
||||||
bspc monitor eDP-1 -d 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
bspc monitor LVDS-1 -d 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
||||||
|
|
||||||
bspc config border_width 2
|
bspc config border_width 2
|
||||||
bspc config window_gap 2
|
bspc config window_gap 2
|
||||||
|
|||||||
@@ -1,8 +1,17 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
|
osConfig,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
# osConfig carries config from configuration.nix
|
||||||
|
scale =
|
||||||
|
if osConfig.res == "1366x768"
|
||||||
|
then 0.80
|
||||||
|
else if osConfig.res == "2560x1440"
|
||||||
|
then 1.25
|
||||||
|
else 1.00;
|
||||||
|
in {
|
||||||
home.activation.copyStartpage = lib.mkAfter ''
|
home.activation.copyStartpage = lib.mkAfter ''
|
||||||
mkdir -p ~/.firefox-startpage
|
mkdir -p ~/.firefox-startpage
|
||||||
cp -r ${./startpage}/* ~/.firefox-startpage/
|
cp -r ${./startpage}/* ~/.firefox-startpage/
|
||||||
@@ -118,10 +127,10 @@
|
|||||||
# for tiling window managers expands to the size of the window
|
# for tiling window managers expands to the size of the window
|
||||||
|
|
||||||
# https://support.mozilla.org/en-US/questions/1253302
|
# https://support.mozilla.org/en-US/questions/1253302
|
||||||
"mousewheel.with_control.action" = "1";
|
"mousewheel.with_control.action" = 1;
|
||||||
|
|
||||||
# should change this based on your resolution
|
# should change this based on your resolution
|
||||||
"layout.css.devPixelsPerPx" = 1.25;
|
"layout.css.devPixelsPerPx" = scale;
|
||||||
|
|
||||||
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
||||||
"full-screen-api.ignore-widgets" = true;
|
"full-screen-api.ignore-widgets" = true;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
services.ssh-agent.enable = true;
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.gitAndTools.gitFull;
|
package = pkgs.gitAndTools.gitFull;
|
||||||
|
|||||||
7
home/programs/keepassxc/default.nix
Normal file
7
home/programs/keepassxc/default.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
home.file.".config/keepassxc/keepassxc.ini".source = ./keepassxc.ini;
|
||||||
|
}
|
||||||
21
home/programs/keepassxc/keepassxc.ini
Normal file
21
home/programs/keepassxc/keepassxc.ini
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
[General]
|
||||||
|
ConfigVersion=2
|
||||||
|
|
||||||
|
[Browser]
|
||||||
|
CustomProxyLocation=
|
||||||
|
|
||||||
|
[GUI]
|
||||||
|
ApplicationTheme=dark
|
||||||
|
ShowExpiredEntriesOnDatabaseUnlockOffsetDays=6
|
||||||
|
TrayIconAppearance=monochrome-light
|
||||||
|
|
||||||
|
[PasswordGenerator]
|
||||||
|
AdditionalChars=
|
||||||
|
ExcludedChars=
|
||||||
|
Length=31
|
||||||
|
LowerCase=true
|
||||||
|
Numbers=true
|
||||||
|
SpecialChars=true
|
||||||
|
UpperCase=true
|
||||||
|
WordCount=8
|
||||||
|
WordSeparator=!
|
||||||
12
home/programs/nf/default.nix
Normal file
12
home/programs/nf/default.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
home.activation.makeNfDir = lib.mkAfter ''
|
||||||
|
mkdir -p ~/journal
|
||||||
|
mkdir -p ~/journal/rest
|
||||||
|
chmod -R u+w ~/journal
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -9,4 +9,4 @@ view=icon
|
|||||||
recurse=true
|
recurse=true
|
||||||
sort=alpha
|
sort=alpha
|
||||||
icon_caps=false
|
icon_caps=false
|
||||||
dirs=/home/synchronous/.wallpapers;
|
dirs=$HOME/.wallpapers;
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
rust-analyzer-unwrapped
|
rust-analyzer-unwrapped
|
||||||
black
|
black
|
||||||
nodejs_22
|
nodejs_22
|
||||||
|
latexrun
|
||||||
# gh
|
# gh
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -12,3 +12,51 @@ vim.api.nvim_create_autocmd("VimResized", {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- hide and unhide lualine when entering and leaving goyo
|
||||||
|
|
||||||
|
local lualine = require('lualine')
|
||||||
|
local grp = vim.api.nvim_create_augroup('goyo_lualine_toggle', { clear = true })
|
||||||
|
|
||||||
|
local function hide() lualine.hide{ place = {'statusline', 'winbar', 'tabline'} } end
|
||||||
|
local function unhide() lualine.hide{ place = {'statusline', 'winbar', 'tabline'}, unhide = true } end
|
||||||
|
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('User', {
|
||||||
|
group = grp,
|
||||||
|
pattern = 'GoyoEnter',
|
||||||
|
callback = function()
|
||||||
|
lualine.hide({ place = {'statusline', 'winbar', 'tabline'} })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('User', {
|
||||||
|
group = grp,
|
||||||
|
pattern = 'GoyoLeave',
|
||||||
|
callback = function()
|
||||||
|
lualine.hide({ place = {'statusline', 'winbar', 'tabline'}, unhide = true })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('VimEnter', {
|
||||||
|
group = grp,
|
||||||
|
once = true,
|
||||||
|
callback = function()
|
||||||
|
local w = vim.g.goyo_if
|
||||||
|
if w then
|
||||||
|
vim.schedule(hide)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('UIEnter', {
|
||||||
|
once = true,
|
||||||
|
group = grp,
|
||||||
|
callback = function()
|
||||||
|
local w = vim.g.goyo_if
|
||||||
|
if w then
|
||||||
|
vim.opt.showtabline = 0
|
||||||
|
vim.cmd('BarbarDisable')
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ line-size = 3
|
|||||||
;locale = tr_TR.UTF-8
|
;locale = tr_TR.UTF-8
|
||||||
|
|
||||||
width = 99.7%
|
width = 99.7%
|
||||||
height = 25
|
; height = 25
|
||||||
offset-x = 4
|
; offset-x = 4
|
||||||
offset-y = 3
|
; offset-y = 3
|
||||||
padding-left = 2
|
padding-left = 2
|
||||||
padding-right = 2
|
padding-right = 2
|
||||||
module-margin-left = 3
|
module-margin-left = 3
|
||||||
@@ -29,14 +29,16 @@ module-margin-right = 0
|
|||||||
tray-position = right
|
tray-position = right
|
||||||
tray-detached = false
|
tray-detached = false
|
||||||
|
|
||||||
|
; font-0 = "NotoSans-Regular:size=11;2.5"
|
||||||
|
; font-1 = "JetBrainsMono Nerd Font:style=Regular:size=11;2.5"
|
||||||
|
; font-2 = "Noto Sans Symbols:size=13;1"
|
||||||
|
|
||||||
background = ${colors.background}
|
background = ${colors.background}
|
||||||
foreground = ${colors.foreground}
|
foreground = ${colors.foreground}
|
||||||
|
|
||||||
|
|
||||||
; noto -> text font
|
; noto -> text font
|
||||||
; jetbrains -> icons
|
; jetbrains -> icons
|
||||||
font-0 = "NotoSans-Regular:size=11;2.5"
|
|
||||||
font-1 = "JetBrainsMono Nerd Font:style=Regular:size=11;2.5"
|
|
||||||
font-2 = "Noto Sans Symbols:size=13;1"
|
|
||||||
|
|
||||||
; font-0 = B612:style=Regular:size=9;3
|
; font-0 = B612:style=Regular:size=9;3
|
||||||
; font-0 = "NotoSans Nerd Font:size=9;3"
|
; font-0 = "NotoSans Nerd Font:size=9;3"
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
|
osConfig,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
mypolybar = pkgs.polybar.override {
|
mypolybar = pkgs.polybar.override {
|
||||||
@@ -37,6 +38,43 @@
|
|||||||
# ${ip} route | ${grep} default | ${awk} '{print $5}' > $out
|
# ${ip} route | ${grep} default | ${awk} '{print $5}' > $out
|
||||||
# '';
|
# '';
|
||||||
|
|
||||||
|
hd = ''
|
||||||
|
[bar/mybar]
|
||||||
|
height = 20
|
||||||
|
font-0 = "NotoSans-Regular:size=9;2.5"
|
||||||
|
font-1 = "JetBrainsMono Nerd Font:style=Regular:size=9;2.5"
|
||||||
|
font-2 = "Noto Sans Symbols:size=9;1"
|
||||||
|
offset-x = 2
|
||||||
|
offset-y = 2
|
||||||
|
'';
|
||||||
|
|
||||||
|
fhd = ''
|
||||||
|
[bar/mybar]
|
||||||
|
height = 20
|
||||||
|
font-0 = "NotoSans-Regular:size=11;2.5"
|
||||||
|
font-1 = "JetBrainsMono Nerd Font:style=Regular:size=11;2.5"
|
||||||
|
font-2 = "Noto Sans Symbols:size=11;1"
|
||||||
|
offset-x = 4
|
||||||
|
offset-y = 3
|
||||||
|
'';
|
||||||
|
|
||||||
|
qhd = ''
|
||||||
|
[bar/mybar]
|
||||||
|
height = 25
|
||||||
|
font-0 = "NotoSans-Regular:size=11;2.5"
|
||||||
|
font-1 = "JetBrainsMono Nerd Font:style=Regular:size=11;2.5"
|
||||||
|
font-2 = "Noto Sans Symbols:size=13;1"
|
||||||
|
offset-x = 4
|
||||||
|
offset-y = 3
|
||||||
|
'';
|
||||||
|
|
||||||
|
mon =
|
||||||
|
if osConfig.res == "1366x768"
|
||||||
|
then hd
|
||||||
|
else if osConfig.res == "2560x1440"
|
||||||
|
then qhd
|
||||||
|
else fhd;
|
||||||
|
|
||||||
internets = ''
|
internets = ''
|
||||||
[module/network]
|
[module/network]
|
||||||
type = internal/network
|
type = internal/network
|
||||||
@@ -61,7 +99,7 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
package = mypolybar;
|
package = mypolybar;
|
||||||
config = ./config.ini;
|
config = ./config.ini;
|
||||||
extraConfig = bctl + internets;
|
extraConfig = bctl + internets + mon;
|
||||||
# my savior: https://www.reddit.com/r/NixOS/comments/v8ikwq/polybar_doesnt_start_at_launch/
|
# my savior: https://www.reddit.com/r/NixOS/comments/v8ikwq/polybar_doesnt_start_at_launch/
|
||||||
script = ''
|
script = ''
|
||||||
# echo "none"
|
# echo "none"
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
# ./nitrogen/defualt.nix
|
# ./nitrogen/defualt.nix
|
||||||
./rofi/default.nix
|
./rofi/default.nix
|
||||||
./polybar/default.nix
|
./polybar/default.nix
|
||||||
|
|
||||||
# wm stuff
|
# wm stuff
|
||||||
./sxhkd/default.nix
|
./sxhkd/default.nix
|
||||||
./bspwm/default.nix
|
./bspwm/default.nix
|
||||||
@@ -23,5 +22,7 @@
|
|||||||
./firefox/default.nix
|
./firefox/default.nix
|
||||||
./git/default.nix
|
./git/default.nix
|
||||||
./zathura/default.nix
|
./zathura/default.nix
|
||||||
|
./keepassxc/default.nix
|
||||||
|
./nf/default.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
91
home/programs/rofi/styles/prompt-search.rasi
Normal file
91
home/programs/rofi/styles/prompt-search.rasi
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
@import "/home/synchronous/.config/rofi/styles/colors.rasi"
|
||||||
|
|
||||||
|
configuration {
|
||||||
|
show-icons: false;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
pink: @base0C;
|
||||||
|
cyan: @base0F;
|
||||||
|
green: #9ece6a;
|
||||||
|
|
||||||
|
accent-color: @base06;
|
||||||
|
urgent-color: @base0A;
|
||||||
|
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: @text;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
location: center;
|
||||||
|
anchor: center;
|
||||||
|
fullscreen: false;
|
||||||
|
y-offset: 0px;
|
||||||
|
|
||||||
|
enabled: true;
|
||||||
|
background-color: @background;
|
||||||
|
cursor: "default";
|
||||||
|
border: 1px;
|
||||||
|
border-color: #565657;
|
||||||
|
width: 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
inputbar {
|
||||||
|
enabled: true;
|
||||||
|
background-color: @prompt;
|
||||||
|
padding: 10px;
|
||||||
|
children: ["entry"];
|
||||||
|
}
|
||||||
|
|
||||||
|
entry {
|
||||||
|
enabled: true;
|
||||||
|
padding: 0.75em 0.75em;
|
||||||
|
cursor: text;
|
||||||
|
}
|
||||||
|
|
||||||
|
listview {
|
||||||
|
enabled: true;
|
||||||
|
columns: 1;
|
||||||
|
lines: 10;
|
||||||
|
cycle: true;
|
||||||
|
dynamic: true;
|
||||||
|
scrollbar: false;
|
||||||
|
layout: vertical;
|
||||||
|
reverse: false;
|
||||||
|
fixed-height: true;
|
||||||
|
fixed-columns: true;
|
||||||
|
margin: 0.25em 0 0.25em;
|
||||||
|
cursor: "default";
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt {
|
||||||
|
text-color: @accent-color;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
textbox {
|
||||||
|
padding: 0.5em 1.5em;
|
||||||
|
background-color: @prompt;
|
||||||
|
}
|
||||||
|
|
||||||
|
element {
|
||||||
|
enabled: true;
|
||||||
|
margin: 0 0.25em;
|
||||||
|
padding: 0.5em 0.75em;
|
||||||
|
cursor: pointer;
|
||||||
|
orientation: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-text {
|
||||||
|
highlight: @green;
|
||||||
|
cursor: inherit;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
horizontal-align: 0.0;
|
||||||
|
font: "Liga SFMono Nerd Font 14";
|
||||||
|
}
|
||||||
|
|
||||||
|
element-text selected {
|
||||||
|
text-color: @cyan;
|
||||||
|
}
|
||||||
@@ -181,18 +181,18 @@ super + bracket{left,right}
|
|||||||
# alacritty -e nvim /home/synchronous/Documents/Obsidian/Journal/Daily.md -c "execute 'normal G' | Goyo | autocmd VimResized * call GoyoWrapper()"
|
# alacritty -e nvim /home/synchronous/Documents/Obsidian/Journal/Daily.md -c "execute 'normal G' | Goyo | autocmd VimResized * call GoyoWrapper()"
|
||||||
# open my notes file in nvim w/ a new alacritty window, then jump to end of file
|
# open my notes file in nvim w/ a new alacritty window, then jump to end of file
|
||||||
super + {o}
|
super + {o}
|
||||||
open_daily
|
sh nf daily
|
||||||
|
|
||||||
# open my notes without goyo and with nvimteee
|
# open my notes without goyo and with nvimteee
|
||||||
super + {shift} + {o}
|
super + {shift} + {o}
|
||||||
alacritty -e nvim /home/synchronous/journal/Daily.md -c "execute 'normal G' | NvimTreeOpen /home/synchronous/journal"
|
sh nf daily
|
||||||
|
|
||||||
# search my notes using rofi and open the right one
|
# search my notes using rofi and open the right one
|
||||||
super + {ctrl} + {o}
|
super + {ctrl} + {o}
|
||||||
sh /home/synchronous/.scripts/vimwiki/search_notes.sh
|
sh nf search
|
||||||
|
|
||||||
super + {ctrl} + {p}
|
# super + {ctrl} + {p}
|
||||||
sh /home/synchronous/.scripts/papers/paper-search-cached.sh
|
# sh /home/synchronous/.scripts/papers/paper-search-cached.sh
|
||||||
|
|
||||||
super + {ctrl} + {l}
|
super + {ctrl} + {l}
|
||||||
sh /home/synchronous/.scripts/papers/paper-search.sh
|
sh /home/synchronous/.scripts/papers/paper-search.sh
|
||||||
@@ -211,7 +211,8 @@ super + {alt} + {c}
|
|||||||
find /home/synchronous/current-semester -follow -maxdepth 1 | cut -c36- | sed '/^[[:space:]]*$/d' | rofi -dmenu | read rsem; yq ".url" "/home/synchronous/current-semester/$rsem/info.yaml" | xargs firefox
|
find /home/synchronous/current-semester -follow -maxdepth 1 | cut -c36- | sed '/^[[:space:]]*$/d' | rofi -dmenu | read rsem; yq ".url" "/home/synchronous/current-semester/$rsem/info.yaml" | xargs firefox
|
||||||
|
|
||||||
super + {p}
|
super + {p}
|
||||||
sh /home/synchronous/.scripts/vimwiki/open_todo.sh
|
# sh /home/synchronous/.scripts/vimwiki/open_todo.sh
|
||||||
|
nf todo
|
||||||
|
|
||||||
super + {m}
|
super + {m}
|
||||||
sh /home/synchronous/.scripts/vimwiki/open-learning.sh
|
sh /home/synchronous/.scripts/vimwiki/open-learning.sh
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
system,
|
system,
|
||||||
|
config,
|
||||||
|
osConfig,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
home.packages = with pkgs; [zsh-powerlevel10k meslo-lgs-nf];
|
home.packages = with pkgs; [zsh-powerlevel10k meslo-lgs-nf];
|
||||||
@@ -39,6 +41,13 @@
|
|||||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
'';
|
'';
|
||||||
|
|
||||||
initExtra = builtins.readFile ./zshrc;
|
# recall agenix secrets cannot be used at eval time, so we must do this trash
|
||||||
|
# like what the fuck? I spent 4 hours figuring this out. will i ever reach nix nirvana?
|
||||||
|
initExtra = ''
|
||||||
|
${builtins.readFile ./zshrc}
|
||||||
|
if [ -f "${osConfig.age.secrets.zsh_remote.path}" ]; then
|
||||||
|
source "${osConfig.age.secrets.zsh_remote.path}"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ alias ytdl-mp3="yt-dlp -x --audio-format mp3 --audio-quality 0 -o '/home/synchro
|
|||||||
alias ntpsync="sudo ntpdate pool.ntp.org"
|
alias ntpsync="sudo ntpdate pool.ntp.org"
|
||||||
# alias fb="cd /home/synchronous/code/tob/fb"
|
# alias fb="cd /home/synchronous/code/tob/fb"
|
||||||
alias nuid="echo 002141542"
|
alias nuid="echo 002141542"
|
||||||
# alias gb="sh /home/synchronous/.scripts/bluetooth/gb.sh"
|
alias gb="sh /etc/profiles/per-user/synchronous/bin/gb"
|
||||||
alias gbdc="bluetoothctl disconnect"
|
alias gbdc="bluetoothctl disconnect"
|
||||||
# alias sxhkdrc="vim /home/synchronous/.config/sxhkd/sxhkdrc"
|
# alias sxhkdrc="vim /home/synchronous/.config/sxhkd/sxhkdrc"
|
||||||
# alias bspwmrc="vim /home/synchronous/.config/bspwm/bspwmrc"
|
# alias bspwmrc="vim /home/synchronous/.config/bspwm/bspwmrc"
|
||||||
|
|||||||
167
home/scripts/journal/nf.sh
Normal file
167
home/scripts/journal/nf.sh
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
main="/home/synchronous/journal"
|
||||||
|
#main_dir="$main/abstract"
|
||||||
|
#main="/home/synchronous/code/nm/notes"
|
||||||
|
main_dir="$main/rest"
|
||||||
|
rofi_prompt="/home/synchronous/.config/rofi/styles/prompt-search.rasi"
|
||||||
|
len_maindir=${#main_dir}
|
||||||
|
|
||||||
|
search() {
|
||||||
|
rs="$(find "$main_dir" -follow -printf "%T@ %Tc %p\n" | sort -n -r | cut -c"$((len_maindir + 56))"- | rg -a '\.md$')"
|
||||||
|
rcv=$(echo "$rs" | rofi -dmenu -theme "$rofi_prompt")
|
||||||
|
if [[ "$rcv" == "" ]]; then exit 1; fi
|
||||||
|
if [[ $(echo "$rs" | rg "$rcv") ]]; then # check if we actually have our note
|
||||||
|
alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \
|
||||||
|
-c "execute 'lua vim.g.goyo_if = 1' | Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" &!
|
||||||
|
# -c "lua vim.g.goyo_if = 1"
|
||||||
|
# -c "syntax match LinkPattern /[a-zA-Z0-9\-][a-zA-Z0-9\-]*\.md/" \
|
||||||
|
# -c "highlight LinkPattern guifg=LightBlue gui=underline" \
|
||||||
|
# -c "nnoremap <CR> :call CustomGf()<CR>" \
|
||||||
|
# -c "nnoremap gf :call CustomGf()<CR>" \
|
||||||
|
else
|
||||||
|
|
||||||
|
# if rcv doesn't contain md, add it
|
||||||
|
if [[ $(echo "$rcv" | rg -v '\.md$') ]]; then
|
||||||
|
rcv="$rcv.md"
|
||||||
|
fi
|
||||||
|
|
||||||
|
no_md="${rcv%.md}"
|
||||||
|
replaced="${no_md//[-_]/ }"
|
||||||
|
# echo "lol"
|
||||||
|
|
||||||
|
alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \
|
||||||
|
-c "execute 'lua vim.g.goyo_if = 1' | Goyo | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \
|
||||||
|
-c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" &!
|
||||||
|
# make sure standardized frontmatter is there
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
open_daily() {
|
||||||
|
alacritty -t "daily.md" -e nvim "$main/daily.md" \
|
||||||
|
-c "Goyo | set path+=$main_dir" \
|
||||||
|
-c "execute 'normal G'" \
|
||||||
|
-c "lua vim.g.goyo_if = 1" &!
|
||||||
|
}
|
||||||
|
|
||||||
|
open_todo() {
|
||||||
|
alacritty -t "todo.md" -e nvim "$main/todo.md" \
|
||||||
|
-c "execute 'lua vim.g.goyo_if = 1' | Goyo | set path+=$main_dir" &!
|
||||||
|
# -c "execute 'normal G'"
|
||||||
|
}
|
||||||
|
|
||||||
|
notes_find() {
|
||||||
|
rg $2 $main_dir
|
||||||
|
}
|
||||||
|
|
||||||
|
search_by_tags() {
|
||||||
|
tt=""
|
||||||
|
# while IFS= read -r -d '' file; do
|
||||||
|
# is_tags=$(awk 'NR==3 {print substr($0, 1, 4)}' "$file")
|
||||||
|
# if [[ $is_tags == "tags" ]]; then
|
||||||
|
# line=$(sed -n '3p' "$file")
|
||||||
|
# tt+=$(echo "$file" | cut -c"$((len_maindir + 2))"- )
|
||||||
|
# tt+=" [$(echo "$line" | cut -c7-)]\n"
|
||||||
|
# fi
|
||||||
|
# done < <(find $main_dir -type f -print0)
|
||||||
|
|
||||||
|
rs="$(find "$main_dir" -follow -printf "%T@ %Tc %p\n" | sort -n -r | cut -c"$((len_maindir + 49))"- | rg -a '\.md$')"
|
||||||
|
|
||||||
|
while IFS= read -r -d '' file; do
|
||||||
|
{ read -r _; read -r _; read -r line; } < "$file"
|
||||||
|
|
||||||
|
if [[ ${line:0:4} == "tags" ]]; then
|
||||||
|
tags="${line:6}"
|
||||||
|
tags="${tags#"${tags%%[![:space:]]*}"}"
|
||||||
|
tags="${tags%"${tags##*[![:space:]]}"}"
|
||||||
|
filename="${file:$((len_maindir + 1))}"
|
||||||
|
tt+="$filename [$tags]\n"
|
||||||
|
fi
|
||||||
|
done < <(find "$main_dir" -type f -print0)
|
||||||
|
|
||||||
|
rcv=$(echo -e "$tt" | awk 'NR > 1 {print prev} {prev=$0} END {printf "%s", prev}' | rofi -dmenu -theme "$rofi_prompt")
|
||||||
|
rcv=$(echo $rcv | sed 's/ \[[^]]*\]$//')
|
||||||
|
if [[ "$rcv" == "" ]]; then exit 1; fi
|
||||||
|
if [[ $(echo "$rs" | rg "$rcv") ]]; then # check if we actually have our note
|
||||||
|
alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \
|
||||||
|
-c "execute 'lua vim.g.goyo_if = 1' | Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" &!
|
||||||
|
else
|
||||||
|
|
||||||
|
# if rcv doesn't contain md, add it
|
||||||
|
if [[ $(echo "$rcv" | rg -v '\.md$') ]]; then
|
||||||
|
rcv="$rcv.md"
|
||||||
|
fi
|
||||||
|
|
||||||
|
no_md="${rcv%.md}"
|
||||||
|
replaced="${no_md//[-_]/ }"
|
||||||
|
|
||||||
|
alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \
|
||||||
|
-c "execute 'lua vim.g.goyo_if = 1' | Goyo | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \
|
||||||
|
-c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" &!
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
search_by_title() {
|
||||||
|
# tt=""
|
||||||
|
# while IFS= read -r -d '' file; do
|
||||||
|
# is_title=$(awk 'NR==2 {print substr($0, 1, 5)}' "$file")
|
||||||
|
# if [[ $is_title == "title" ]]; then
|
||||||
|
# line=$(sed -n '2p' "$file")
|
||||||
|
# # tt+="$(echo "$line" | cut -c7-)"
|
||||||
|
# tt+="$(echo "$line" | cut -c7- | sed 's/^ *//; s/ *$//')"
|
||||||
|
# tt+=' ('$(echo "$file" | cut -c"$((len_maindir + 2))"- )')\n'
|
||||||
|
# fi
|
||||||
|
# done < <(find $main_dir -type f -print0)
|
||||||
|
|
||||||
|
rs="$(find "$main_dir" -follow -printf "%T@ %Tc %p\n" | sort -n -r | cut -c"$((len_maindir + 49))"- | rg -a '\.md$')"
|
||||||
|
|
||||||
|
tt=""
|
||||||
|
while IFS= read -r -d '' file; do
|
||||||
|
{ read -r _; read -r line; } < "$file"
|
||||||
|
|
||||||
|
if [[ ${line:0:5} == "title" ]]; then
|
||||||
|
title="${line:6}"
|
||||||
|
|
||||||
|
title="${title#"${title%%[![:space:]]*}"}"
|
||||||
|
title="${title%"${title##*[![:space:]]}"}"
|
||||||
|
filename="${file:$((len_maindir + 1))}"
|
||||||
|
tt+="$title ($filename)\n"
|
||||||
|
fi
|
||||||
|
done < <(find "$main_dir" -type f -print0)
|
||||||
|
|
||||||
|
rcv=$(echo -e "$tt" | awk 'NR > 1 {print prev} {prev=$0} END {printf "%s", prev}' | rofi -dmenu -theme "$rofi_prompt")
|
||||||
|
rcv=$(echo $rcv | rg -e "[a-zA-Z0-9]*\.md" -o)
|
||||||
|
if [[ "$rcv" == "" ]]; then exit 1; fi
|
||||||
|
# echo "$rcv"
|
||||||
|
if [[ $(echo "$rs" | rg "$rcv") ]]; then # check if we actually have our note
|
||||||
|
alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \
|
||||||
|
-c "execute 'lua vim.g.goyo_if = 1' | Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" &!
|
||||||
|
else
|
||||||
|
|
||||||
|
# if rcv doesn't contain md, add it
|
||||||
|
if [[ $(echo "$rcv" | rg -v '\.md$') ]]; then
|
||||||
|
rcv="$rcv.md"
|
||||||
|
fi
|
||||||
|
|
||||||
|
no_md="${rcv%.md}"
|
||||||
|
replaced="${no_md//[-_]/ }"
|
||||||
|
|
||||||
|
alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \
|
||||||
|
-c "execute 'lua vim.g.goyo_if = 1' | Goyo | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \
|
||||||
|
-c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" &!
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
run_command() {
|
||||||
|
case $1 in
|
||||||
|
"search") search ;;
|
||||||
|
"daily") open_daily ;;
|
||||||
|
"todo") open_todo ;;
|
||||||
|
"find") notes_find ;;
|
||||||
|
"tags") search_by_tags ;;
|
||||||
|
"title") search_by_title ;;
|
||||||
|
*)
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
run_command "$1"
|
||||||
@@ -14,7 +14,7 @@ if git --git-dir /home/synchronous/nix-cfg/.git diff-index --quiet HEAD; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
/run/current-system/sw/bin/nix flake check /home/synchronous/nix-cfg/ || { echo "Flake check failed. Exiting."; exit 1; }
|
# /run/current-system/sw/bin/nix flake check /home/synchronous/nix-cfg/ || { echo "Flake check failed. Exiting."; exit 1; }
|
||||||
|
|
||||||
# Autoformat your nix files
|
# Autoformat your nix files
|
||||||
alejandra . &>/dev/null \
|
alejandra . &>/dev/null \
|
||||||
@@ -34,8 +34,10 @@ git status --porcelain
|
|||||||
echo ""
|
echo ""
|
||||||
echo "NixOS Rebuilding..."
|
echo "NixOS Rebuilding..."
|
||||||
|
|
||||||
|
prev=$(basename $(readlink /run/current-system) | sed 's/.*nixos-system-\(.*\)-.*$/\1/')
|
||||||
|
|
||||||
# Rebuild, output simplified errors, log trackebacks
|
# Rebuild, output simplified errors, log trackebacks
|
||||||
sudo /run/current-system/sw/bin/nixos-rebuild switch --flake /home/synchronous/nix-cfg/flake.nix 2>&1 | tee /tmp/nixos-switch.log
|
sudo /run/current-system/sw/bin/nixos-rebuild switch --flake /home/synchronous/nix-cfg/flake.nix#"$prev" 2>&1 | tee /tmp/nixos-switch.log
|
||||||
|
|
||||||
# cat /tmp/nixos-switch.log | grep --color error && exit 1
|
# cat /tmp/nixos-switch.log | grep --color error && exit 1
|
||||||
|
|
||||||
|
|||||||
2
home/scripts/res.sh
Normal file
2
home/scripts/res.sh
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
export SCREEN_RES=$(xrandr | grep "*" | awk '{print $1}')
|
||||||
@@ -6,6 +6,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./picom/default.nix
|
./picom/default.nix
|
||||||
./dunst/default.nix
|
./dunst/default.nix
|
||||||
./gpg-agent/default.nix
|
# ./gpg-agent/default.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
263
hosts/thonkpad/configuration.nix
Normal file
263
hosts/thonkpad/configuration.nix
Normal file
@@ -0,0 +1,263 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
pkg_with_working_nitrogen = import (builtins.fetchTarball {
|
||||||
|
url = "https://github.com/NixOS/nixpkgs/archive/c0c50dfcb70d48e5b79c4ae9f1aa9d339af860b4.tar.gz";
|
||||||
|
sha256 = "17p3w4mgfr4yj2p0jz6kqgzhyr04h4fap5hnd837664xd1xhwdjb";
|
||||||
|
}) {inherit (pkgs) system;};
|
||||||
|
|
||||||
|
old-nitrogen = pkg_with_working_nitrogen.nitrogen;
|
||||||
|
in {
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
../../system/system.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
options.res = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "1920x1080";
|
||||||
|
description = "screen resolution";
|
||||||
|
};
|
||||||
|
|
||||||
|
options.zsh_remote = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "1920x1080";
|
||||||
|
description = "zsh remote secret";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
backupFileExtension = "hm-backup";
|
||||||
|
# sharedModules = [agenix.homeManagerModules.default];
|
||||||
|
# extraSpecialArgs = {inherit (config);};
|
||||||
|
# users.synchronous.imports = [
|
||||||
|
# ({
|
||||||
|
# config,
|
||||||
|
# lib,
|
||||||
|
# ...
|
||||||
|
# }:
|
||||||
|
# import ../../home/home.nix {
|
||||||
|
# inherit config pkgs lib;
|
||||||
|
# })
|
||||||
|
# ];
|
||||||
|
users.synchronous.imports = [../../home/home.nix];
|
||||||
|
};
|
||||||
|
|
||||||
|
res = "1366x768";
|
||||||
|
age = {
|
||||||
|
secrets.zsh_remote = {
|
||||||
|
file = ../../secrets/zsh_remote.age;
|
||||||
|
owner = "synchronous";
|
||||||
|
mode = "0400";
|
||||||
|
};
|
||||||
|
secretsDir = "/home/synchronous/.agenix/agenix";
|
||||||
|
secretsMountPoint = "/home/synchronous/.agenix/agenix.d";
|
||||||
|
identityPaths = ["/home/synchronous/.ssh/id_ed25519"];
|
||||||
|
};
|
||||||
|
|
||||||
|
# config = {
|
||||||
|
# res = "1366x768";
|
||||||
|
# };
|
||||||
|
|
||||||
|
# system.res = "1366x768";
|
||||||
|
|
||||||
|
# Bootloader.
|
||||||
|
# boot.loader.grub.enable = true;
|
||||||
|
# boot.loader.grub.device = "/dev/sda";
|
||||||
|
# boot.loader.grub.useOSProber = true;
|
||||||
|
# boot.loader.grub.version = 2;
|
||||||
|
#boot = {
|
||||||
|
# loader.systemd-boot = {
|
||||||
|
# enable = true;
|
||||||
|
# editor = false;
|
||||||
|
# };
|
||||||
|
# kernelPackages = pkgs.linuxPackages;
|
||||||
|
#};
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
boot.loader.grub.enable = false;
|
||||||
|
|
||||||
|
networking.hostName = "thonkpad"; # Define your hostname.
|
||||||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
nixPath = [
|
||||||
|
"nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos"
|
||||||
|
"nixos-config=/home/synchronous/nix-cfg/configuration.nix"
|
||||||
|
"/nix/var/nix/profiles/per-user/root/channels"
|
||||||
|
];
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
experimental-features = ["nix-command" "flakes"];
|
||||||
|
substituters = [
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
|
# Enable networking
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "America/New_York";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "en_US.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||||
|
LC_MEASUREMENT = "en_US.UTF-8";
|
||||||
|
LC_MONETARY = "en_US.UTF-8";
|
||||||
|
LC_NAME = "en_US.UTF-8";
|
||||||
|
LC_NUMERIC = "en_US.UTF-8";
|
||||||
|
LC_PAPER = "en_US.UTF-8";
|
||||||
|
LC_TELEPHONE = "en_US.UTF-8";
|
||||||
|
LC_TIME = "en_US.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
services.printing.enable = true;
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
# Enable sound with pipewire.
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
# If you want to use JACK applications, uncomment this
|
||||||
|
#jack.enable = true;
|
||||||
|
|
||||||
|
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||||
|
# no need to redefine it in your config for now)
|
||||||
|
#media-session.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
|
# services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
|
users.users.synchronous = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "jake";
|
||||||
|
extraGroups = ["networkmanager" "wheel"];
|
||||||
|
packages = with pkgs; [
|
||||||
|
kdePackages.kate
|
||||||
|
# firefox
|
||||||
|
git
|
||||||
|
arandr
|
||||||
|
procs
|
||||||
|
htop
|
||||||
|
zsh
|
||||||
|
ripgrep
|
||||||
|
rofi
|
||||||
|
alacritty
|
||||||
|
python3
|
||||||
|
tree
|
||||||
|
old-nitrogen
|
||||||
|
polybar
|
||||||
|
sxhkd
|
||||||
|
bspwm
|
||||||
|
# librewolf
|
||||||
|
eza
|
||||||
|
flameshot
|
||||||
|
neofetch
|
||||||
|
lolcat
|
||||||
|
nnn
|
||||||
|
xclip
|
||||||
|
brightnessctl
|
||||||
|
xbindkeys
|
||||||
|
pulseaudio
|
||||||
|
xorg.xf86inputsynaptics
|
||||||
|
libnotify # for notify-send
|
||||||
|
alejandra
|
||||||
|
discord
|
||||||
|
legcord
|
||||||
|
polybar-pulseaudio-control
|
||||||
|
bluez # polybar
|
||||||
|
zotero
|
||||||
|
texliveFull
|
||||||
|
texlivePackages.latexmk
|
||||||
|
nmap
|
||||||
|
procps # for pgrep
|
||||||
|
# xorg.xrandr
|
||||||
|
# thunderbird
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
security.sudo = {
|
||||||
|
# me ne frego. i dare you to privilege escalate me
|
||||||
|
enable = true;
|
||||||
|
extraRules = [
|
||||||
|
{
|
||||||
|
commands = [
|
||||||
|
{
|
||||||
|
command = "/etc/profiles/per-user/synchronous/bin/rebuild";
|
||||||
|
options = ["NOPASSWD"];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "/home/synchronous/nix-cfg/home/scripts/nixos-rebuild.sh";
|
||||||
|
options = ["NOPASSWD"];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "/home/synchronous/.scripts/nixos-rebuild.sh";
|
||||||
|
options = ["NOPASSWD"];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# are you serious?
|
||||||
|
command = "/run/current-system/sw/bin/nixos-rebuild switch --flake /home/synchronous/nix-cfg/flake.nix";
|
||||||
|
options = ["NOPASSWD"];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
users = ["synchronous"];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Allow unfree packages
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# List packages installed in system profile. To search, run:
|
||||||
|
# $ nix search wget
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vim
|
||||||
|
neovim
|
||||||
|
linux-manual
|
||||||
|
man-pages
|
||||||
|
man-pages-posix
|
||||||
|
fontconfig
|
||||||
|
python3
|
||||||
|
rofi
|
||||||
|
flameshot
|
||||||
|
tree
|
||||||
|
# nitrogen
|
||||||
|
polybar
|
||||||
|
sxhkd
|
||||||
|
bspwm
|
||||||
|
# librewolf
|
||||||
|
];
|
||||||
|
|
||||||
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
# this value at the release version of the first install of this system.
|
||||||
|
# Before changing this value read the documentation for this option
|
||||||
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
|
system.stateVersion = "24.11"; # Did you read the comment?
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -12,16 +12,22 @@
|
|||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
boot.initrd.availableKernelModules = ["ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci"];
|
||||||
boot.initrd.kernelModules = [];
|
boot.initrd.kernelModules = [];
|
||||||
boot.kernelModules = ["kvm-intel"];
|
boot.kernelModules = ["kvm-intel"];
|
||||||
boot.extraModulePackages = [];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/05ca9d56-3506-43c5-b9ec-be928b782996";
|
device = "/dev/disk/by-uuid/aa4ec46a-b4aa-4a7c-a016-7d6e224cd7ba";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/CCA5-0BDD";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = ["fmask=0077" "dmask=0077"];
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices = [];
|
swapDevices = [];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
@@ -29,8 +35,8 @@
|
|||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
# networking.interfaces.enp0s25.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
warning: Path '/home/synchronous/nix-cfg/flake.nix' should point at the directory containing the 'flake.nix' file, not the file itself. Pretending that you meant '/home/synchronous/nix-cfg'
|
|
||||||
warning: Git tree '/home/synchronous/nix-cfg' is dirty
|
|
||||||
error:
|
|
||||||
… while calling the 'seq' builtin
|
|
||||||
at /nix/store/6zgbbqlr7nnfxpzkyj7fsl4fpg89jbw0-source/lib/modules.nix:334:18:
|
|
||||||
333| options = checked options;
|
|
||||||
334| config = checked (removeAttrs config [ "_module" ]);
|
|
||||||
| ^
|
|
||||||
335| _module = checked (config._module);
|
|
||||||
|
|
||||||
… while evaluating a branch condition
|
|
||||||
at /nix/store/6zgbbqlr7nnfxpzkyj7fsl4fpg89jbw0-source/lib/modules.nix:273:9:
|
|
||||||
272| checkUnmatched =
|
|
||||||
273| if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then
|
|
||||||
| ^
|
|
||||||
274| let
|
|
||||||
|
|
||||||
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
|
|
||||||
|
|
||||||
error: syntax error, unexpected ';'
|
|
||||||
at /nix/store/f06nazkwk5a29vz793alp0zppviacn27-source/configuration.nix:142:7:
|
|
||||||
141| }
|
|
||||||
142| ];;;
|
|
||||||
| ^
|
|
||||||
143| };
|
|
||||||
6
secrets/secrets.nix
Normal file
6
secrets/secrets.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# so yeah you gotta run `agenix -e secret.age` to actually edit a secret
|
||||||
|
let
|
||||||
|
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEw4Uqg9UBakoOpS4nVGE3ePKHnst0+02lFN04n2IyKb ginesin.j@northeastern.edu";
|
||||||
|
in {
|
||||||
|
"zsh_remote.age".publicKeys = [key];
|
||||||
|
}
|
||||||
BIN
secrets/zsh_remote.age
Normal file
BIN
secrets/zsh_remote.age
Normal file
Binary file not shown.
@@ -12,16 +12,22 @@
|
|||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
boot.initrd.availableKernelModules = ["ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci"];
|
||||||
boot.initrd.kernelModules = [];
|
boot.initrd.kernelModules = [];
|
||||||
boot.kernelModules = ["kvm-intel"];
|
boot.kernelModules = ["kvm-intel"];
|
||||||
boot.extraModulePackages = [];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/05ca9d56-3506-43c5-b9ec-be928b782996";
|
device = "/dev/disk/by-uuid/aa4ec46a-b4aa-4a7c-a016-7d6e224cd7ba";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/CCA5-0BDD";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = ["fmask=0077" "dmask=0077"];
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices = [];
|
swapDevices = [];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
@@ -29,8 +35,8 @@
|
|||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
# networking.interfaces.enp0s25.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./configuration/hardware-configuration.nix
|
# ./configuration/hardware-configuration.nix
|
||||||
./power-management/default.nix
|
./power-management/default.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,51 +4,29 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# services.xserver.dpi = 180;
|
# services.xserver.dpi = 180;
|
||||||
|
# services.dbus.enable = true;
|
||||||
|
security.polkit.enable = true;
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
xkb.layout = "us";
|
xkb.layout = "us";
|
||||||
xkb.variant = "";
|
xkb.variant = "";
|
||||||
|
|
||||||
# displayManager.defaultSession = "bspwm";
|
displayManager.defaultSession = "none+bspwm";
|
||||||
desktopManager.xterm.enable = false;
|
desktopManager.xterm.enable = false;
|
||||||
|
|
||||||
windowManager.bspwm.enable = true;
|
windowManager.bspwm.enable = true;
|
||||||
|
|
||||||
# windowManager.bspwm = {
|
|
||||||
# enable = true;
|
|
||||||
# # extraConfig = builtins.readFile ./bspwmrc;
|
|
||||||
# # configFile = ./bspwmrc; # relative import to preserve locality of config
|
|
||||||
# # package = "bspwm-unstable";
|
|
||||||
# # sxhkd.package = "sxhkd-unstable";
|
|
||||||
# # sxhkd.configFile = ./sxhkdrc;
|
|
||||||
# };
|
|
||||||
|
|
||||||
displayManager = {
|
displayManager = {
|
||||||
# autoLogin.user = "synchronous";
|
# autoLogin.user = "synchronous";
|
||||||
# autoLogin.enable = true;
|
# autoLogin.enable = true;
|
||||||
|
|
||||||
lightdm = {
|
# lightdm = {
|
||||||
|
# enable = true;
|
||||||
|
# greeters.gtk.enable = true;
|
||||||
|
# };
|
||||||
|
sddm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
greeters.gtk.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# xsession.windowManager.bspwm = {
|
|
||||||
# enable = true;
|
|
||||||
# extraConfig = builtins.readFile ./bspwmrc;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# services.sxhkd.enable = true;
|
|
||||||
# services.sxhkd.extraConfig = builtins.readFile ./sxhkdrc;
|
|
||||||
|
|
||||||
# services.displayManager.autoLogin.enable = true;
|
|
||||||
|
|
||||||
# services.displayManagrer.sddm.enable = true;
|
|
||||||
# services.desktopManager.plasma6.enable = true;
|
|
||||||
|
|
||||||
# services.xserver.xkb = {
|
|
||||||
# layout = "us";
|
|
||||||
# variant = "";
|
|
||||||
# }
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user