From 4216730c15fb3d9d8019a86180d3ee96ce1abc48 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Sun, 27 Apr 2025 16:44:10 -0400 Subject: [PATCH 01/45] 20 current 2025-04-27 16:44:06 25.05.20250424.f771eb4 6.12.24 * --- configuration.nix | 20 ++++++++-- flake.lock | 33 ++++++++-------- hardware-configuration.nix | 14 +++++-- home/home.nix | 1 + home/services/services.nix | 2 +- nixos-switch.log | 25 ------------ .../configuration/hardware-configuration.nix | 14 +++++-- system/hardware/hardware.nix | 2 +- system/xserver/default.nix | 38 ++++--------------- 9 files changed, 65 insertions(+), 84 deletions(-) delete mode 100644 nixos-switch.log diff --git a/configuration.nix b/configuration.nix index 763794a..3cee014 100644 --- a/configuration.nix +++ b/configuration.nix @@ -14,14 +14,25 @@ old-nitrogen = pkg_with_working_nitrogen.nitrogen; in { imports = [ - # ./hardware-configuration.nix + ./hardware-configuration.nix ./system/system.nix ]; # Bootloader. - boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/nvme0n1"; - boot.loader.grub.useOSProber = true; + # 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. @@ -72,6 +83,7 @@ in { # 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; diff --git a/flake.lock b/flake.lock index 0fcc9e1..696aad1 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", "type": "github" }, "original": { @@ -25,11 +25,11 @@ ] }, "locked": { - "lastModified": 1734622215, - "narHash": "sha256-OOfI0XhSJGHblfdNDhfnn8QnZxng63rWk9eeJ2tCbiI=", + "lastModified": 1745703610, + "narHash": "sha256-KgaGPlmjJItZ+Xf8mSoRmrsso+sf3K54n9oIP9Q17LY=", "owner": "nix-community", "repo": "home-manager", - "rev": "1395379a7a36e40f2a76e7b9936cc52950baa1be", + "rev": "2f5819a962489e037a57835f63ed6ff8dbc2d5fb", "type": "github" }, "original": { @@ -40,11 +40,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1734424634, - "narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=", + "lastModified": 1745526057, + "narHash": "sha256-ITSpPDwvLBZBnPRS2bUcHY3gZSwis/uTe255QgMtTLA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33", + "rev": "f771eb401a46846c1aebd20552521b233dd7e18b", "type": "github" }, "original": { @@ -56,14 +56,17 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1733096140, - "narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=", - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + "lastModified": 1743296961, + "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", + "type": "github" }, "original": { - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" } }, "root": { diff --git a/hardware-configuration.nix b/hardware-configuration.nix index afc3905..8988e1a 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -12,16 +12,22 @@ (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.kernelModules = ["kvm-intel"]; boot.extraModulePackages = []; fileSystems."/" = { - device = "/dev/disk/by-uuid/05ca9d56-3506-43c5-b9ec-be928b782996"; + device = "/dev/disk/by-uuid/aa4ec46a-b4aa-4a7c-a016-7d6e224cd7ba"; fsType = "ext4"; }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/CCA5-0BDD"; + fsType = "vfat"; + options = ["fmask=0077" "dmask=0077"]; + }; + swapDevices = []; # 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 # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s25.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/home/home.nix b/home/home.nix index 9e99542..8060b03 100644 --- a/home/home.nix +++ b/home/home.nix @@ -30,6 +30,7 @@ in { EDITOR = "nvim"; HOME = "/home/synchronous"; XDG_CACHE_HOME = "$HOME/.cache"; + DBUS_SESSION_BUS_ADDRESS = "unix:path=$XDG_RUNTIME_DIR/bus"; }; programs.home-manager.enable = true; diff --git a/home/services/services.nix b/home/services/services.nix index 921dcc6..f721d3c 100644 --- a/home/services/services.nix +++ b/home/services/services.nix @@ -6,6 +6,6 @@ imports = [ ./picom/default.nix ./dunst/default.nix - ./gpg-agent/default.nix + # ./gpg-agent/default.nix ]; } diff --git a/nixos-switch.log b/nixos-switch.log deleted file mode 100644 index 5891e46..0000000 --- a/nixos-switch.log +++ /dev/null @@ -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| }; diff --git a/system/hardware/configuration/hardware-configuration.nix b/system/hardware/configuration/hardware-configuration.nix index afc3905..8988e1a 100644 --- a/system/hardware/configuration/hardware-configuration.nix +++ b/system/hardware/configuration/hardware-configuration.nix @@ -12,16 +12,22 @@ (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.kernelModules = ["kvm-intel"]; boot.extraModulePackages = []; fileSystems."/" = { - device = "/dev/disk/by-uuid/05ca9d56-3506-43c5-b9ec-be928b782996"; + device = "/dev/disk/by-uuid/aa4ec46a-b4aa-4a7c-a016-7d6e224cd7ba"; fsType = "ext4"; }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/CCA5-0BDD"; + fsType = "vfat"; + options = ["fmask=0077" "dmask=0077"]; + }; + swapDevices = []; # 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 # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s25.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/system/hardware/hardware.nix b/system/hardware/hardware.nix index b82e1c4..360ac8d 100644 --- a/system/hardware/hardware.nix +++ b/system/hardware/hardware.nix @@ -4,7 +4,7 @@ ... }: { imports = [ - ./configuration/hardware-configuration.nix + # ./configuration/hardware-configuration.nix ./power-management/default.nix ]; } diff --git a/system/xserver/default.nix b/system/xserver/default.nix index d6c8257..37be12d 100644 --- a/system/xserver/default.nix +++ b/system/xserver/default.nix @@ -4,51 +4,29 @@ ... }: { # services.xserver.dpi = 180; + # services.dbus.enable = true; + security.polkit.enable = true; services.xserver = { enable = true; xkb.layout = "us"; xkb.variant = ""; - # displayManager.defaultSession = "bspwm"; + displayManager.defaultSession = "none+bspwm"; desktopManager.xterm.enable = false; 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 = { # autoLogin.user = "synchronous"; # autoLogin.enable = true; - lightdm = { + # lightdm = { + # enable = true; + # greeters.gtk.enable = true; + # }; + sddm = { 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 = ""; - # } } From 81ea1c045f446182f75d1652bda1a0d7210a983d Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Sun, 27 Apr 2025 16:47:13 -0400 Subject: [PATCH 02/45] 21 current 2025-04-27 16:47:09 25.05.20250424.f771eb4 6.12.24 * --- home/programs/bspwm/bspwmrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/home/programs/bspwm/bspwmrc b/home/programs/bspwm/bspwmrc index 0332449..43b0da2 100644 --- a/home/programs/bspwm/bspwmrc +++ b/home/programs/bspwm/bspwmrc @@ -10,7 +10,8 @@ pgrep -x sxhkd > /dev/null || sxhkd & # xrandr --output eDP-1 --mode 1920x1080 --primary # 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 From 2e3e61c765ea4b7cd5856de3b9f3212515b65c4e Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Sun, 27 Apr 2025 16:48:45 -0400 Subject: [PATCH 03/45] 22 current 2025-04-27 16:48:40 25.05.20250424.f771eb4 6.12.24 * --- home/programs/bspwm/bspwmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/programs/bspwm/bspwmrc b/home/programs/bspwm/bspwmrc index 43b0da2..ca41340 100644 --- a/home/programs/bspwm/bspwmrc +++ b/home/programs/bspwm/bspwmrc @@ -13,7 +13,7 @@ pgrep -x sxhkd > /dev/null || sxhkd & # 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 window_gap 2 From f627ec2f9f0bfb6c6dfc810bb70ab797ccb25f44 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Sun, 27 Apr 2025 16:51:10 -0400 Subject: [PATCH 04/45] 22 current 2025-04-27 16:48:40 25.05.20250424.f771eb4 6.12.24 * --- home/programs/nitrogen/nitrogen.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/programs/nitrogen/nitrogen.cfg b/home/programs/nitrogen/nitrogen.cfg index 8453943..25f389b 100644 --- a/home/programs/nitrogen/nitrogen.cfg +++ b/home/programs/nitrogen/nitrogen.cfg @@ -9,4 +9,4 @@ view=icon recurse=true sort=alpha icon_caps=false -dirs=/home/synchronous/.wallpapers; +dirs=$HOME/.wallpapers; From 7d51a56a7a606d17736e8898686c7a0572120683 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Mon, 28 Apr 2025 21:37:05 -0400 Subject: [PATCH 05/45] 23 current 2025-04-28 21:36:52 25.05.20250424.f771eb4 6.12.24 * --- flake-old.nix | 103 ++++++++++ flake.lock | 38 +--- flake.nix | 120 +++-------- home/home.nix | 6 + home/programs/polybar/config.ini | 5 +- home/scripts/res.sh | 2 + hosts/thonkpad/configuration.nix | 236 ++++++++++++++++++++++ hosts/thonkpad/hardware-configuration.nix | 43 ++++ 8 files changed, 426 insertions(+), 127 deletions(-) create mode 100644 flake-old.nix create mode 100644 home/scripts/res.sh create mode 100644 hosts/thonkpad/configuration.nix create mode 100644 hosts/thonkpad/hardware-configuration.nix diff --git a/flake-old.nix b/flake-old.nix new file mode 100644 index 0000000..671ebf3 --- /dev/null +++ b/flake-old.nix @@ -0,0 +1,103 @@ +{ + description = "Nixos config flake"; + + inputs = { + flake-parts.url = "github:hercules-ci/flake-parts"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + # haumea = { + # url = "github:nix-community/haumea/v0.2.2"; + # inputs.nixpkgs.follows = "nixpkgs"; + # }; + }; + + outputs = inputs @ { + flake-parts, + self, + nixpkgs, + ... + }: + flake-parts.lib.mkFlake { + inherit inputs; + } { + imports = []; + + systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"]; + perSystem = { + 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 = [ + ./hosts/thonkpad/configuration.nix + # ./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; } + # ]; + # }; + # }; + }; +} diff --git a/flake.lock b/flake.lock index 696aad1..3d8d275 100644 --- a/flake.lock +++ b/flake.lock @@ -1,23 +1,5 @@ { "nodes": { - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1743550720, - "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "c621e8422220273271f52058f618c94e405bb0f5", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -42,36 +24,20 @@ "locked": { "lastModified": 1745526057, "narHash": "sha256-ITSpPDwvLBZBnPRS2bUcHY3gZSwis/uTe255QgMtTLA=", - "owner": "nixos", + "owner": "NixOS", "repo": "nixpkgs", "rev": "f771eb401a46846c1aebd20552521b233dd7e18b", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1743296961, - "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, "root": { "inputs": { - "flake-parts": "flake-parts", "home-manager": "home-manager", "nixpkgs": "nixpkgs" } diff --git a/flake.nix b/flake.nix index f7fc67f..a996ff0 100644 --- a/flake.nix +++ b/flake.nix @@ -1,102 +1,44 @@ { - 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 = { - flake-parts.url = "github:hercules-ci/flake-parts"; - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - - # haumea = { - # url = "github:nix-community/haumea/v0.2.2"; - # inputs.nixpkgs.follows = "nixpkgs"; - # }; }; - outputs = inputs @ { - flake-parts, + outputs = { self, nixpkgs, - ... - }: - flake-parts.lib.mkFlake { - inherit inputs; - } { - imports = []; - - systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"]; - perSystem = { - 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; } - # ]; - # }; - # }; + home-manager, + }: let + baseModule = { + imports = [ + home-manager.nixosModules.default + ]; + system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; + nixpkgs.overlays = []; }; + in { + nixosConfigurations.thonkpad = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + baseModule + ./hosts/thonkpad/configuration.nix + ]; + }; + }; } diff --git a/home/home.nix b/home/home.nix index 8060b03..2a7dd6d 100644 --- a/home/home.nix +++ b/home/home.nix @@ -65,4 +65,10 @@ in { (builtins.readFile file) ) ); + + # home.file.".profile".text = '' + # if [ -f "$HOME/.scripts/res.sh" ]; then + # . "$HOME/.scripts/res.sh" + # fi + # ''; } diff --git a/home/programs/polybar/config.ini b/home/programs/polybar/config.ini index 4329d24..7cb03c7 100644 --- a/home/programs/polybar/config.ini +++ b/home/programs/polybar/config.ini @@ -32,12 +32,13 @@ tray-detached = false background = ${colors.background} foreground = ${colors.foreground} -; noto -> text font -; 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" +; noto -> text font +; jetbrains -> icons + ; font-0 = B612:style=Regular:size=9;3 ; font-0 = "NotoSans Nerd Font:size=9;3" ; font-2 = "Noto Color Emoji:style=Regular:size=9;3" diff --git a/home/scripts/res.sh b/home/scripts/res.sh new file mode 100644 index 0000000..a0b39f1 --- /dev/null +++ b/home/scripts/res.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +export SCREEN_RES=$(xrandr | grep "*" | awk '{print $1}') diff --git a/hosts/thonkpad/configuration.nix b/hosts/thonkpad/configuration.nix new file mode 100644 index 0000000..3f067ae --- /dev/null +++ b/hosts/thonkpad/configuration.nix @@ -0,0 +1,236 @@ +# 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 + ]; + + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + backupFileExtension = "hm-backup"; + users.synchronous = import ../../home/home.nix; + }; + + # 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 = "/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? +} diff --git a/hosts/thonkpad/hardware-configuration.nix b/hosts/thonkpad/hardware-configuration.nix new file mode 100644 index 0000000..8988e1a --- /dev/null +++ b/hosts/thonkpad/hardware-configuration.nix @@ -0,0 +1,43 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = ["ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/aa4ec46a-b4aa-4a7c-a016-7d6e224cd7ba"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/CCA5-0BDD"; + fsType = "vfat"; + options = ["fmask=0077" "dmask=0077"]; + }; + + swapDevices = []; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s25.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} From f1da08b74bdfd9a2b3d025e5d391dff89240524c Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Mon, 28 Apr 2025 22:11:11 -0400 Subject: [PATCH 06/45] 24 current 2025-04-28 22:10:57 25.05.20250424.f771eb4 6.12.24 * --- flake.nix | 16 +++++++------- home/programs/polybar/config.ini | 7 ++++--- home/programs/polybar/default.nix | 35 ++++++++++++++++++++++++++++++- home/scripts/rebuild.sh | 2 +- home/test.tex | 0 hosts/thonkpad/configuration.nix | 4 ++++ 6 files changed, 51 insertions(+), 13 deletions(-) delete mode 100644 home/test.tex diff --git a/flake.nix b/flake.nix index a996ff0..fd4664c 100644 --- a/flake.nix +++ b/flake.nix @@ -2,14 +2,14 @@ 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=" - ]; + # 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 = { diff --git a/home/programs/polybar/config.ini b/home/programs/polybar/config.ini index 7cb03c7..41e5060 100644 --- a/home/programs/polybar/config.ini +++ b/home/programs/polybar/config.ini @@ -29,13 +29,14 @@ module-margin-right = 0 tray-position = right tray-detached = false -background = ${colors.background} -foreground = ${colors.foreground} - 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} +foreground = ${colors.foreground} + + ; noto -> text font ; jetbrains -> icons diff --git a/home/programs/polybar/default.nix b/home/programs/polybar/default.nix index 8bfe10f..d1dcec7 100644 --- a/home/programs/polybar/default.nix +++ b/home/programs/polybar/default.nix @@ -37,6 +37,39 @@ # ${ip} route | ${grep} default | ${awk} '{print $5}' > $out # ''; + res = builtins.getEnv "RES"; + + hd = '' + [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" + ''; + + 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" + ''; + + 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" + ''; + + mon = + if res == "1366x768" + then hd + else if res == "2560x1440" + then qhd + else fhd; + internets = '' [module/network] type = internal/network @@ -61,7 +94,7 @@ in { enable = true; package = mypolybar; 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/ script = '' # echo "none" diff --git a/home/scripts/rebuild.sh b/home/scripts/rebuild.sh index b6e11cd..c1c5e45 100644 --- a/home/scripts/rebuild.sh +++ b/home/scripts/rebuild.sh @@ -14,7 +14,7 @@ if git --git-dir /home/synchronous/nix-cfg/.git diff-index --quiet HEAD; then exit 0 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 alejandra . &>/dev/null \ diff --git a/home/test.tex b/home/test.tex deleted file mode 100644 index e69de29..0000000 diff --git a/hosts/thonkpad/configuration.nix b/hosts/thonkpad/configuration.nix index 3f067ae..995ff1c 100644 --- a/hosts/thonkpad/configuration.nix +++ b/hosts/thonkpad/configuration.nix @@ -25,6 +25,10 @@ in { users.synchronous = import ../../home/home.nix; }; + environment.variables = { + RES = "1366x768"; + }; + # Bootloader. # boot.loader.grub.enable = true; # boot.loader.grub.device = "/dev/sda"; From 6d884d5a60d405e83bd7e93adc25f42f4e159e66 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Mon, 28 Apr 2025 22:14:02 -0400 Subject: [PATCH 07/45] 25 current 2025-04-28 22:13:49 25.05.20250424.f771eb4 6.12.24 * --- home/programs/polybar/config.ini | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/home/programs/polybar/config.ini b/home/programs/polybar/config.ini index 41e5060..caef68f 100644 --- a/home/programs/polybar/config.ini +++ b/home/programs/polybar/config.ini @@ -19,7 +19,7 @@ line-size = 3 ;locale = tr_TR.UTF-8 width = 99.7% -height = 25 +; height = 25 offset-x = 4 offset-y = 3 padding-left = 2 @@ -29,9 +29,9 @@ module-margin-right = 0 tray-position = right 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" +; 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} foreground = ${colors.foreground} From e18380a8911aaef3d9268a0b7c23331e9ec08ca1 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Mon, 28 Apr 2025 22:20:27 -0400 Subject: [PATCH 08/45] 25 current 2025-04-28 22:13:49 25.05.20250424.f771eb4 6.12.24 * --- home/programs/polybar/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home/programs/polybar/default.nix b/home/programs/polybar/default.nix index d1dcec7..ca1f085 100644 --- a/home/programs/polybar/default.nix +++ b/home/programs/polybar/default.nix @@ -42,9 +42,9 @@ hd = '' [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" + font-0 = "NotoSans-Regular:size=10;2.5" + font-1 = "JetBrainsMono Nerd Font:style=Regular:size=10;2.5" + font-2 = "Noto Sans Symbols:size=0;1" ''; fhd = '' From b66aee780ced9548f5a3729e3721535097eeb862 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Mon, 28 Apr 2025 22:28:37 -0400 Subject: [PATCH 09/45] 26 current 2025-04-28 22:28:24 25.05.20250424.f771eb4 6.12.24 * --- home/programs/polybar/default.nix | 2 +- hosts/thonkpad/configuration.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/home/programs/polybar/default.nix b/home/programs/polybar/default.nix index ca1f085..17358cb 100644 --- a/home/programs/polybar/default.nix +++ b/home/programs/polybar/default.nix @@ -44,7 +44,7 @@ height = 20 font-0 = "NotoSans-Regular:size=10;2.5" font-1 = "JetBrainsMono Nerd Font:style=Regular:size=10;2.5" - font-2 = "Noto Sans Symbols:size=0;1" + font-2 = "Noto Sans Symbols:size=10;1" ''; fhd = '' diff --git a/hosts/thonkpad/configuration.nix b/hosts/thonkpad/configuration.nix index 995ff1c..8475eba 100644 --- a/hosts/thonkpad/configuration.nix +++ b/hosts/thonkpad/configuration.nix @@ -25,7 +25,7 @@ in { users.synchronous = import ../../home/home.nix; }; - environment.variables = { + environment.sessionVariables = { RES = "1366x768"; }; From c7a6d42afce534505ce279bd2ffb78a62f94892d Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Tue, 29 Apr 2025 02:11:40 -0400 Subject: [PATCH 10/45] 27 current 2025-04-29 02:11:26 25.05.20250424.f771eb4 6.12.24 * --- flake.nix | 1 + home/programs/polybar/default.nix | 7 +- home/programs/programs.nix | 1 - hosts/thonkpad/configuration.nix | 416 +++++++++++++++--------------- 4 files changed, 214 insertions(+), 211 deletions(-) diff --git a/flake.nix b/flake.nix index fd4664c..e95bad2 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,7 @@ in { nixosConfigurations.thonkpad = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; + modules = [ baseModule ./hosts/thonkpad/configuration.nix diff --git a/home/programs/polybar/default.nix b/home/programs/polybar/default.nix index 17358cb..359dc87 100644 --- a/home/programs/polybar/default.nix +++ b/home/programs/polybar/default.nix @@ -2,6 +2,7 @@ config, pkgs, lib, + osConfig, ... }: let mypolybar = pkgs.polybar.override { @@ -37,8 +38,6 @@ # ${ip} route | ${grep} default | ${awk} '{print $5}' > $out # ''; - res = builtins.getEnv "RES"; - hd = '' [bar/mybar] height = 20 @@ -64,9 +63,9 @@ ''; mon = - if res == "1366x768" + if osConfig.res == "1366x768" then hd - else if res == "2560x1440" + else if osConfig.res == "2560x1440" then qhd else fhd; diff --git a/home/programs/programs.nix b/home/programs/programs.nix index d65995d..7cd2e7f 100644 --- a/home/programs/programs.nix +++ b/home/programs/programs.nix @@ -13,7 +13,6 @@ # ./nitrogen/defualt.nix ./rofi/default.nix ./polybar/default.nix - # wm stuff ./sxhkd/default.nix ./bspwm/default.nix diff --git a/hosts/thonkpad/configuration.nix b/hosts/thonkpad/configuration.nix index 8475eba..b7380c7 100644 --- a/hosts/thonkpad/configuration.nix +++ b/hosts/thonkpad/configuration.nix @@ -1,9 +1,7 @@ -# 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, + lib, ... }: let pkg_with_working_nitrogen = import (builtins.fetchTarball { @@ -18,223 +16,229 @@ in { ../../system/system.nix ]; - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - backupFileExtension = "hm-backup"; - users.synchronous = import ../../home/home.nix; + options.res = lib.mkOption { + type = lib.types.str; + default = "1920x1080"; + description = "screen resolution"; }; - environment.sessionVariables = { - 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" + config = { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + backupFileExtension = "hm-backup"; + extraSpecialArgs = {inherit (config) res;}; + users.synchronous.imports = [ + ({ + config, + lib, + ... + }: + import ../../home/home.nix { + inherit config pkgs lib; + }) ]; - trusted-public-keys = [ - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + # users.synchronous = import ../../home/home.nix { + # inherit config lib pkgs; + # }; + }; + + res = "1366x768"; + + # 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 ]; }; - }; - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + 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"]; + } + ]; + }; - # Enable networking - networking.networkmanager.enable = true; + # Allow unfree packages + nixpkgs.config.allowUnfree = 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 + # 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 - old-nitrogen + # 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 ]; + + # 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? }; - - 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? } From ad80ef546726b492852f13245a2bc938f048eadf Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Tue, 29 Apr 2025 02:18:01 -0400 Subject: [PATCH 11/45] 28 current 2025-04-29 02:17:47 25.05.20250424.f771eb4 6.12.24 * --- home/programs/polybar/config.ini | 4 ++-- home/programs/polybar/default.nix | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/home/programs/polybar/config.ini b/home/programs/polybar/config.ini index caef68f..f189c9f 100644 --- a/home/programs/polybar/config.ini +++ b/home/programs/polybar/config.ini @@ -20,8 +20,8 @@ line-size = 3 width = 99.7% ; height = 25 -offset-x = 4 -offset-y = 3 +; offset-x = 4 +; offset-y = 3 padding-left = 2 padding-right = 2 module-margin-left = 3 diff --git a/home/programs/polybar/default.nix b/home/programs/polybar/default.nix index 359dc87..414c4f3 100644 --- a/home/programs/polybar/default.nix +++ b/home/programs/polybar/default.nix @@ -41,9 +41,11 @@ hd = '' [bar/mybar] height = 20 - font-0 = "NotoSans-Regular:size=10;2.5" - font-1 = "JetBrainsMono Nerd Font:style=Regular:size=10;2.5" - font-2 = "Noto Sans Symbols:size=10;1" + 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 = 4 + offset-y = 2 ''; fhd = '' @@ -52,6 +54,8 @@ 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 = '' @@ -60,6 +64,8 @@ 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 = From 297c7aee5d7fbec6575688acd4b73329ef5516c4 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Tue, 29 Apr 2025 02:34:48 -0400 Subject: [PATCH 12/45] 29 current 2025-04-29 02:34:34 25.05.20250424.f771eb4 6.12.24 * --- home/programs/firefox/default.nix | 13 +++++++++++-- home/programs/polybar/default.nix | 2 +- hosts/thonkpad/configuration.nix | 3 --- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/home/programs/firefox/default.nix b/home/programs/firefox/default.nix index 29f0718..8c87a21 100644 --- a/home/programs/firefox/default.nix +++ b/home/programs/firefox/default.nix @@ -1,8 +1,17 @@ { pkgs, 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 '' mkdir -p ~/.firefox-startpage cp -r ${./startpage}/* ~/.firefox-startpage/ @@ -121,7 +130,7 @@ "mousewheel.with_control.action" = "1"; # should change this based on your resolution - "layout.css.devPixelsPerPx" = 1.25; + "layout.css.devPixelsPerPx" = scale; "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; "full-screen-api.ignore-widgets" = true; diff --git a/home/programs/polybar/default.nix b/home/programs/polybar/default.nix index 414c4f3..5440947 100644 --- a/home/programs/polybar/default.nix +++ b/home/programs/polybar/default.nix @@ -44,7 +44,7 @@ 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 = 4 + offset-x = 2 offset-y = 2 ''; diff --git a/hosts/thonkpad/configuration.nix b/hosts/thonkpad/configuration.nix index b7380c7..cabcd77 100644 --- a/hosts/thonkpad/configuration.nix +++ b/hosts/thonkpad/configuration.nix @@ -38,9 +38,6 @@ in { inherit config pkgs lib; }) ]; - # users.synchronous = import ../../home/home.nix { - # inherit config lib pkgs; - # }; }; res = "1366x768"; From 0385692efc065ed15e2909e17661e6b451a4446b Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Tue, 29 Apr 2025 03:04:25 -0400 Subject: [PATCH 13/45] 30 current 2025-04-29 03:04:20 25.05.20250424.f771eb4 6.12.24 * --- home/scripts/rebuild.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/home/scripts/rebuild.sh b/home/scripts/rebuild.sh index c1c5e45..d738f6f 100644 --- a/home/scripts/rebuild.sh +++ b/home/scripts/rebuild.sh @@ -34,8 +34,10 @@ git status --porcelain echo "" echo "NixOS Rebuilding..." +prev=$(basename $(readlink /run/current-system) | sed 's/.*nixos-system-\(.*\)-.*$/\1/') + # 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 From 1d6affbbce8660ff00568ce8699696755eca83fd Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Tue, 29 Apr 2025 05:18:14 -0400 Subject: [PATCH 14/45] 31 current 2025-04-29 05:18:07 25.05.20250424.f771eb4 6.12.24 * --- README.md | 14 ++++++++++++++ home/programs/git/default.nix | 1 + 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index b209d2e..bf85dd2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,17 @@ +uhuh yeah endgame nixos config + +Installation: +``` +sudo nixos-install --root /mnt --flake github:jakeginesin/nix-dots#thonkpad +``` +And rebuild with: +``` +sudo nixos-rebuild switch --flake.#thonkpad +``` + # Some crazy dotfiles - [Sylk0s](https://github.com/sylk0s/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) diff --git a/home/programs/git/default.nix b/home/programs/git/default.nix index f2fe278..57b79b7 100644 --- a/home/programs/git/default.nix +++ b/home/programs/git/default.nix @@ -3,6 +3,7 @@ pkgs, ... }: { + services.ssh-agent.enable = true; programs.git = { enable = true; package = pkgs.gitAndTools.gitFull; From 3b391b91ddc80857e91daa3b1fb4884412a4e4be Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Tue, 29 Apr 2025 22:09:29 -0400 Subject: [PATCH 15/45] 32 current 2025-04-29 22:09:23 25.05.20250424.f771eb4 6.12.24 * --- home/programs/nvim/default.nix | 1 + home/scripts/rebuild.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/home/programs/nvim/default.nix b/home/programs/nvim/default.nix index 68206fd..e248e32 100644 --- a/home/programs/nvim/default.nix +++ b/home/programs/nvim/default.nix @@ -30,6 +30,7 @@ rust-analyzer-unwrapped black nodejs_22 + latexrun # gh ]; diff --git a/home/scripts/rebuild.sh b/home/scripts/rebuild.sh index d738f6f..07881ca 100644 --- a/home/scripts/rebuild.sh +++ b/home/scripts/rebuild.sh @@ -37,7 +37,7 @@ echo "NixOS Rebuilding..." prev=$(basename $(readlink /run/current-system) | sed 's/.*nixos-system-\(.*\)-.*$/\1/') # Rebuild, output simplified errors, log trackebacks -sudo /run/current-system/sw/bin/nixos-rebuild switch --flake /home/synchronous/nix-cfg/flake.nix#"$prev" 2>&1 | tee /tmp/nixos-switch.log +/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 From ef2cfb2f37bda5b4b50d187cf91c4e72fdefadf5 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Tue, 29 Apr 2025 23:21:01 -0400 Subject: [PATCH 16/45] 33 current 2025-04-29 23:20:55 25.05.20250424.f771eb4 6.12.24 * --- home/home.nix | 1 + home/programs/keepassxc/default.nix | 7 +++++++ home/programs/keepassxc/keepassxc.ini | 21 +++++++++++++++++++++ home/programs/programs.nix | 1 + home/programs/zsh/zshrc | 2 +- 5 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 home/programs/keepassxc/default.nix create mode 100644 home/programs/keepassxc/keepassxc.ini diff --git a/home/home.nix b/home/home.nix index 2a7dd6d..fa3af2d 100644 --- a/home/home.nix +++ b/home/home.nix @@ -46,6 +46,7 @@ in { beets netcat zathura + keepassxc ] ++ ( with lib; let diff --git a/home/programs/keepassxc/default.nix b/home/programs/keepassxc/default.nix new file mode 100644 index 0000000..e44a17f --- /dev/null +++ b/home/programs/keepassxc/default.nix @@ -0,0 +1,7 @@ +{ + config, + pkgs, + ... +}: { + home.file.".config/keepassxc/keepassxc.ini".source = ./keepassxc.ini; +} diff --git a/home/programs/keepassxc/keepassxc.ini b/home/programs/keepassxc/keepassxc.ini new file mode 100644 index 0000000..5ae798f --- /dev/null +++ b/home/programs/keepassxc/keepassxc.ini @@ -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=! diff --git a/home/programs/programs.nix b/home/programs/programs.nix index 7cd2e7f..aadb688 100644 --- a/home/programs/programs.nix +++ b/home/programs/programs.nix @@ -22,5 +22,6 @@ ./firefox/default.nix ./git/default.nix ./zathura/default.nix + ./keepassxc/default.nix ]; } diff --git a/home/programs/zsh/zshrc b/home/programs/zsh/zshrc index fbd9576..5929134 100644 --- a/home/programs/zsh/zshrc +++ b/home/programs/zsh/zshrc @@ -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 fb="cd /home/synchronous/code/tob/fb" 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 sxhkdrc="vim /home/synchronous/.config/sxhkd/sxhkdrc" # alias bspwmrc="vim /home/synchronous/.config/bspwm/bspwmrc" From 7fbdca4707c4e4a0805221b11ea539d78c95edd6 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 01:30:39 -0400 Subject: [PATCH 17/45] 37 current 2025-04-30 01:30:33 25.05.20250424.f771eb4 6.12.24 * --- flake.lock | 100 ++++++++++++++++++++++++++++++- flake.nix | 6 ++ home/programs/zsh/default.nix | 3 + home/scripts/rebuild.sh | 2 +- hosts/thonkpad/configuration.nix | 6 ++ secrets/secrets.nix | 5 ++ secrets/zsh_remote.age | Bin 0 -> 1014 bytes 7 files changed, 119 insertions(+), 3 deletions(-) create mode 100644 secrets/secrets.nix create mode 100644 secrets/zsh_remote.age diff --git a/flake.lock b/flake.lock index 3d8d275..d26c02e 100644 --- a/flake.lock +++ b/flake.lock @@ -1,6 +1,70 @@ { "nodes": { + "agenix": { + "inputs": { + "darwin": "darwin", + "home-manager": "home-manager", + "nixpkgs": "nixpkgs", + "systems": "systems" + }, + "locked": { + "lastModified": 1745630506, + "narHash": "sha256-bHCFgGeu8XjWlVuaWzi3QONjDW3coZDqSHvnd4l7xus=", + "owner": "ryantm", + "repo": "agenix", + "rev": "96e078c646b711aee04b82ba01aefbff87004ded", + "type": "github" + }, + "original": { + "owner": "ryantm", + "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" + } + }, "home-manager": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1745494811, + "narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -21,6 +85,22 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1745391562, + "narHash": "sha256-sPwcCYuiEopaafePqlG826tBhctuJsLx/mhKKM5Fmjo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8a2f738d9d1f1d986b5a4cd2fd2061a7127237d7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1745526057, "narHash": "sha256-ITSpPDwvLBZBnPRS2bUcHY3gZSwis/uTe255QgMtTLA=", @@ -38,8 +118,24 @@ }, "root": { "inputs": { - "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "agenix": "agenix", + "home-manager": "home-manager_2", + "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" } } }, diff --git a/flake.nix b/flake.nix index e95bad2..0ae98b1 100644 --- a/flake.nix +++ b/flake.nix @@ -18,12 +18,14 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + agenix.url = "github:ryantm/agenix"; }; outputs = { self, nixpkgs, home-manager, + agenix, }: let baseModule = { imports = [ @@ -38,6 +40,10 @@ modules = [ baseModule + { + environment.systemPackages = [agenix.packages.x86_64-linux.default]; + } + agenix.nixosModules.default ./hosts/thonkpad/configuration.nix ]; }; diff --git a/home/programs/zsh/default.nix b/home/programs/zsh/default.nix index 94895be..806b605 100644 --- a/home/programs/zsh/default.nix +++ b/home/programs/zsh/default.nix @@ -2,6 +2,8 @@ pkgs, lib, system, + config, + osConfig, ... }: { home.packages = with pkgs; [zsh-powerlevel10k meslo-lgs-nf]; @@ -39,6 +41,7 @@ [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh ''; + # initExtra = builtins.readFile ./zshrc + builtins.readFile osConfig.age.secrets.zsh_remote.path; initExtra = builtins.readFile ./zshrc; }; } diff --git a/home/scripts/rebuild.sh b/home/scripts/rebuild.sh index 07881ca..d738f6f 100644 --- a/home/scripts/rebuild.sh +++ b/home/scripts/rebuild.sh @@ -37,7 +37,7 @@ echo "NixOS Rebuilding..." prev=$(basename $(readlink /run/current-system) | sed 's/.*nixos-system-\(.*\)-.*$/\1/') # Rebuild, output simplified errors, log trackebacks -/run/current-system/sw/bin/nixos-rebuild switch --flake /home/synchronous/nix-cfg/flake.nix#"$prev" 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 diff --git a/hosts/thonkpad/configuration.nix b/hosts/thonkpad/configuration.nix index cabcd77..a7f96c0 100644 --- a/hosts/thonkpad/configuration.nix +++ b/hosts/thonkpad/configuration.nix @@ -41,6 +41,8 @@ in { }; res = "1366x768"; + age.secrets.zsh_remote.file = ../../secrets/zsh_remote.age; + age.identityPaths = ["/home/synchronous/.ssh/id_ed25519"]; # config = { # res = "1366x768"; @@ -188,6 +190,10 @@ in { extraRules = [ { commands = [ + { + command = "/etc/profiles/per-user/synchronous/bin/rebuild"; + options = ["NOPASSWD"]; + } { command = "/home/synchronous/nix-cfg/home/scripts/nixos-rebuild.sh"; options = ["NOPASSWD"]; diff --git a/secrets/secrets.nix b/secrets/secrets.nix new file mode 100644 index 0000000..b4f71b4 --- /dev/null +++ b/secrets/secrets.nix @@ -0,0 +1,5 @@ +let + key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEw4Uqg9UBakoOpS4nVGE3ePKHnst0+02lFN04n2IyKb ginesin.j@northeastern.edu"; +in { + "zsh_remote.age".publicKeys = [key]; +} diff --git a/secrets/zsh_remote.age b/secrets/zsh_remote.age new file mode 100644 index 0000000000000000000000000000000000000000..a46d6468da00849ea6d05ea9a5b672669422d9d2 GIT binary patch literal 1014 zcmVy|6b9W$i zXlik2Z!$+^VL2;pWq4RwOl)^fD^zGlcxYx+Vl!1lS7cT;bVNB)Q*#PKIXFu-XG2*} zWMpY#OH*`VGc-dhX>wCyL3U#@O=nY3YA-}?cz1R%N_Pq^EiE8oX>)B>S#nb|ML0!A zM@&>zH(_>fNKI`)YB5kZQdw_GNpnP4W_58eXjKY*QJ-o%6yWRUO##_iAPzcZWwOZm zW*Vu^;0nJFqQ_t3TPn$=lsFw6KOf4@VjDP}_WW-ds{)m1V+rKHunKk|(!4|<1)xi5 zV-V)qJjvilH>$V|gsfiow6Dsu((NY%AIsM+YfWvl* zgdUE>?uyQkUov!@K2&OpcCUG_ZFHDyBL68E&fWwF(!JlO%Rb_i7%rXkte zPkfHuG^V?fYXDV5_A6#G{n|LvMn3ov@Y`->JCm5_OjFmE4)zaV+s)4n81UC~7>52G@Bon^y0#YKu3OaDg)FjWeP4*AhF zMvD7!JXk>QB0;R5-}d@pI-n{;T`2n(U)cXtqk<&AA3X|kqA#Okcg}2F{Fa_o6WXRH zrCIYVuX-R!>fW~`5wr%mE>Vleq>|ZwW}x`zl|Wqew+sU{mvfRSuinSyphPbG!i8_O zc}|acXupX&(yoAlRB>lNwV4w7u|7j|<&8*d=1>R{e zK?g47p<{*uvrz=T(-pZGTVe{;zsjcrhc|dV=s}W*oWYju-v+$U%jJ5k_pP1BBX5t0Bx_>YXpHeG3@ATu4?6kUNsgG?&K7O)hSfIYsF9F7ikr~Q86=f>dcI9q1;gmPq354WyD4Q zmkP&;(dXlxMlC8!@}+S7$2pPdW#^tyZ3~LP0xr;GsBfBVcrN)`-s}ITPxO=fio`$z khQJFzd-!D`Elf_4IS Date: Wed, 30 Apr 2025 02:21:42 -0400 Subject: [PATCH 18/45] 38 current 2025-04-30 02:21:35 25.05.20250424.f771eb4 6.12.24 * --- flake.nix | 2 ++ home/home.nix | 5 +++++ home/programs/zsh/default.nix | 2 +- hosts/thonkpad/configuration.nix | 16 +++++++++++++--- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 0ae98b1..f2b9c0e 100644 --- a/flake.nix +++ b/flake.nix @@ -43,7 +43,9 @@ { environment.systemPackages = [agenix.packages.x86_64-linux.default]; } + agenix.nixosModules.default + # agenix.homeManagerModules.age ./hosts/thonkpad/configuration.nix ]; }; diff --git a/home/home.nix b/home/home.nix index fa3af2d..0fbd262 100644 --- a/home/home.nix +++ b/home/home.nix @@ -24,6 +24,11 @@ in { 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.sessionVariables = { diff --git a/home/programs/zsh/default.nix b/home/programs/zsh/default.nix index 806b605..413bb15 100644 --- a/home/programs/zsh/default.nix +++ b/home/programs/zsh/default.nix @@ -41,7 +41,7 @@ [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh ''; - # initExtra = builtins.readFile ./zshrc + builtins.readFile osConfig.age.secrets.zsh_remote.path; initExtra = builtins.readFile ./zshrc; + # initExtra = builtins.readFile ./zshrc; }; } diff --git a/hosts/thonkpad/configuration.nix b/hosts/thonkpad/configuration.nix index a7f96c0..603d6b4 100644 --- a/hosts/thonkpad/configuration.nix +++ b/hosts/thonkpad/configuration.nix @@ -22,12 +22,19 @@ in { 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"; - extraSpecialArgs = {inherit (config) res;}; + # sharedModules = [agenix.homeManagerModules.default]; + extraSpecialArgs = {inherit (config);}; users.synchronous.imports = [ ({ config, @@ -41,8 +48,11 @@ in { }; res = "1366x768"; - age.secrets.zsh_remote.file = ../../secrets/zsh_remote.age; - age.identityPaths = ["/home/synchronous/.ssh/id_ed25519"]; + # age.secrets.zsh_remote.file = ../../secrets/zsh_remote.age; + # zsh_remote = builtins.readFile ../../secrets/zsh_remote.age; + # age.secretsDir = "/home/synchronous/.agenix/agenix"; + # age.secretsMountPoint = "/home/synchronous/.agenix/agenix.d"; + # age.identityPaths = ["/home/synchronous/.ssh/id_ed25519"]; # config = { # res = "1366x768"; From 129bab1fd8b00bf27f6e5205f993145614c73d0d Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 02:37:50 -0400 Subject: [PATCH 19/45] 39 current 2025-04-30 02:37:44 25.05.20250424.f771eb4 6.12.24 * --- hosts/thonkpad/configuration.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hosts/thonkpad/configuration.nix b/hosts/thonkpad/configuration.nix index 603d6b4..6d6538f 100644 --- a/hosts/thonkpad/configuration.nix +++ b/hosts/thonkpad/configuration.nix @@ -48,11 +48,10 @@ in { }; res = "1366x768"; - # age.secrets.zsh_remote.file = ../../secrets/zsh_remote.age; - # zsh_remote = builtins.readFile ../../secrets/zsh_remote.age; - # age.secretsDir = "/home/synchronous/.agenix/agenix"; - # age.secretsMountPoint = "/home/synchronous/.agenix/agenix.d"; - # age.identityPaths = ["/home/synchronous/.ssh/id_ed25519"]; + 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"]; # config = { # res = "1366x768"; From 170e222da041e52fd205549072b1c9e53779442c Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 02:44:59 -0400 Subject: [PATCH 20/45] 40 current 2025-04-30 02:44:53 25.05.20250424.f771eb4 6.12.24 * --- home/programs/zsh/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/home/programs/zsh/default.nix b/home/programs/zsh/default.nix index 413bb15..0ee6799 100644 --- a/home/programs/zsh/default.nix +++ b/home/programs/zsh/default.nix @@ -41,7 +41,12 @@ [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh ''; - initExtra = builtins.readFile ./zshrc; + initExtra = '' + ${builtins.readFile ./zshrc} + if [ -f "${osConfig.age.secrets.zsh_remote.path}" ]; then + source "${osConfig.age.secrets.zsh_remote.path}" + fi + ''; # initExtra = builtins.readFile ./zshrc; }; } From b9563265434c38de3ef3f723b63ecfb8be70d5a3 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 02:52:28 -0400 Subject: [PATCH 21/45] 41 current 2025-04-30 02:52:21 25.05.20250424.f771eb4 6.12.24 * --- home/programs/zsh/default.nix | 3 ++- hosts/thonkpad/configuration.nix | 14 ++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/home/programs/zsh/default.nix b/home/programs/zsh/default.nix index 0ee6799..dc624f9 100644 --- a/home/programs/zsh/default.nix +++ b/home/programs/zsh/default.nix @@ -41,12 +41,13 @@ [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh ''; + # 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 ''; - # initExtra = builtins.readFile ./zshrc; }; } diff --git a/hosts/thonkpad/configuration.nix b/hosts/thonkpad/configuration.nix index 6d6538f..ee4794b 100644 --- a/hosts/thonkpad/configuration.nix +++ b/hosts/thonkpad/configuration.nix @@ -48,10 +48,16 @@ in { }; res = "1366x768"; - 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"]; + 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"; From 64c397b991b10042f65e743aceb6ae83717707ba Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 02:54:01 -0400 Subject: [PATCH 22/45] 42 current 2025-04-30 02:53:55 25.05.20250424.f771eb4 6.12.24 * --- home/home.nix | 1 + secrets/README.md | 0 2 files changed, 1 insertion(+) create mode 100644 secrets/README.md diff --git a/home/home.nix b/home/home.nix index 0fbd262..fea1b43 100644 --- a/home/home.nix +++ b/home/home.nix @@ -52,6 +52,7 @@ in { netcat zathura keepassxc + sshpass ] ++ ( with lib; let diff --git a/secrets/README.md b/secrets/README.md new file mode 100644 index 0000000..e69de29 From 1b71b528ca47862707d3c209bb7cc77fa8b062da Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 02:58:40 -0400 Subject: [PATCH 23/45] 42 current 2025-04-30 02:53:55 25.05.20250424.f771eb4 6.12.24 * --- secrets/README.md | 1 + secrets/secrets.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/secrets/README.md b/secrets/README.md index e69de29..bdf0dd5 100644 --- a/secrets/README.md +++ b/secrets/README.md @@ -0,0 +1 @@ +so yeah you gotta run `agenix -e secret.age` to actually edit a secret diff --git a/secrets/secrets.nix b/secrets/secrets.nix index b4f71b4..9d74b3f 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -1,3 +1,4 @@ +# 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 { From 8d1cb28fd32093854997eb42a6326b4ba585e336 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 03:06:35 -0400 Subject: [PATCH 24/45] 42 current 2025-04-30 02:53:55 25.05.20250424.f771eb4 6.12.24 * --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bf85dd2..f6bc728 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,14 @@ uhuh yeah endgame nixos config -Installation: +# 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 ``` From 7b7f3f4ab7b0b9c64e39b833672723ad6b0cd1f8 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 03:21:17 -0400 Subject: [PATCH 25/45] 42 current 2025-04-30 02:53:55 25.05.20250424.f771eb4 6.12.24 * --- configuration.nix | 229 ------------------------------------- flake-old.nix | 103 ----------------- hardware-configuration.nix | 43 ------- secrets/README.md | 1 - 4 files changed, 376 deletions(-) delete mode 100644 configuration.nix delete mode 100644 flake-old.nix delete mode 100644 hardware-configuration.nix delete mode 100644 secrets/README.md diff --git a/configuration.nix b/configuration.nix deleted file mode 100644 index 3cee014..0000000 --- a/configuration.nix +++ /dev/null @@ -1,229 +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/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 = "/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? -} diff --git a/flake-old.nix b/flake-old.nix deleted file mode 100644 index 671ebf3..0000000 --- a/flake-old.nix +++ /dev/null @@ -1,103 +0,0 @@ -{ - description = "Nixos config flake"; - - inputs = { - flake-parts.url = "github:hercules-ci/flake-parts"; - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - # haumea = { - # url = "github:nix-community/haumea/v0.2.2"; - # inputs.nixpkgs.follows = "nixpkgs"; - # }; - }; - - outputs = inputs @ { - flake-parts, - self, - nixpkgs, - ... - }: - flake-parts.lib.mkFlake { - inherit inputs; - } { - imports = []; - - systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"]; - perSystem = { - 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 = [ - ./hosts/thonkpad/configuration.nix - # ./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; } - # ]; - # }; - # }; - }; -} diff --git a/hardware-configuration.nix b/hardware-configuration.nix deleted file mode 100644 index 8988e1a..0000000 --- a/hardware-configuration.nix +++ /dev/null @@ -1,43 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ - config, - lib, - pkgs, - modulesPath, - ... -}: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = ["ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci"]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-intel"]; - boot.extraModulePackages = []; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/aa4ec46a-b4aa-4a7c-a016-7d6e224cd7ba"; - fsType = "ext4"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/CCA5-0BDD"; - fsType = "vfat"; - options = ["fmask=0077" "dmask=0077"]; - }; - - swapDevices = []; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s25.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/secrets/README.md b/secrets/README.md deleted file mode 100644 index bdf0dd5..0000000 --- a/secrets/README.md +++ /dev/null @@ -1 +0,0 @@ -so yeah you gotta run `agenix -e secret.age` to actually edit a secret From 9d0103a4a7cc24f930f0fe79e166d2d3f1af8355 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 03:37:30 -0400 Subject: [PATCH 26/45] 43 current 2025-04-30 03:37:24 25.05.20250424.f771eb4 6.12.24 * --- home/programs/firefox/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/programs/firefox/default.nix b/home/programs/firefox/default.nix index 8c87a21..3690730 100644 --- a/home/programs/firefox/default.nix +++ b/home/programs/firefox/default.nix @@ -127,7 +127,7 @@ in { # for tiling window managers expands to the size of the window # 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 "layout.css.devPixelsPerPx" = scale; From 03ac9fbfd028f4a447dbf9bb875805d9928fa3d6 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 16:25:38 -0400 Subject: [PATCH 27/45] 44 current 2025-04-30 16:25:32 25.05.20250424.f771eb4 6.12.24 * --- home/programs/nf/default.nix | 11 ++ home/programs/programs.nix | 1 + home/programs/rofi/styles/prompt-search.rasi | 91 ++++++++++ home/scripts/journal/nf.sh | 165 +++++++++++++++++++ 4 files changed, 268 insertions(+) create mode 100644 home/programs/nf/default.nix create mode 100644 home/programs/rofi/styles/prompt-search.rasi create mode 100644 home/scripts/journal/nf.sh diff --git a/home/programs/nf/default.nix b/home/programs/nf/default.nix new file mode 100644 index 0000000..ecd90ac --- /dev/null +++ b/home/programs/nf/default.nix @@ -0,0 +1,11 @@ +{ + config, + pkgs, + lib, + ... +}: { + home.activation.makeNfDir = lib.mkAfter '' + mkdir -p ~/journal + chmod -R u+w ~/journal + ''; +} diff --git a/home/programs/programs.nix b/home/programs/programs.nix index aadb688..8b38da7 100644 --- a/home/programs/programs.nix +++ b/home/programs/programs.nix @@ -23,5 +23,6 @@ ./git/default.nix ./zathura/default.nix ./keepassxc/default.nix + ./nf/default.nix ]; } diff --git a/home/programs/rofi/styles/prompt-search.rasi b/home/programs/rofi/styles/prompt-search.rasi new file mode 100644 index 0000000..e380159 --- /dev/null +++ b/home/programs/rofi/styles/prompt-search.rasi @@ -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; +} diff --git a/home/scripts/journal/nf.sh b/home/scripts/journal/nf.sh new file mode 100644 index 0000000..c523048 --- /dev/null +++ b/home/scripts/journal/nf.sh @@ -0,0 +1,165 @@ +#!/bin/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 + 49))"- | 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 "Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" &! + # -c "syntax match LinkPattern /[a-zA-Z0-9\-][a-zA-Z0-9\-]*\.md/" \ + # -c "highlight LinkPattern guifg=LightBlue gui=underline" \ + # -c "nnoremap :call CustomGf()" \ + # -c "nnoremap gf :call CustomGf()" \ + 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 "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'" +} + +open_todo() { + alacritty -t "todo.md" -e nvim "$main/todo.md" \ + -c "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 "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 "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 +} + +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 "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 "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 +} + +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" From 7335bb741ac211a892d9430e35d3a0381ca048f1 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 16:28:05 -0400 Subject: [PATCH 28/45] 45 current 2025-04-30 16:27:59 25.05.20250424.f771eb4 6.12.24 * --- home/scripts/journal/nf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/scripts/journal/nf.sh b/home/scripts/journal/nf.sh index c523048..aa6e315 100644 --- a/home/scripts/journal/nf.sh +++ b/home/scripts/journal/nf.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash main="/home/synchronous/journal/" #main_dir="$main/abstract" From 3cf77e268324099dfed64fb5cd8a39aca839d284 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 16:29:09 -0400 Subject: [PATCH 29/45] 46 current 2025-04-30 16:29:03 25.05.20250424.f771eb4 6.12.24 * --- home/scripts/journal/nf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/scripts/journal/nf.sh b/home/scripts/journal/nf.sh index aa6e315..c05b7f1 100644 --- a/home/scripts/journal/nf.sh +++ b/home/scripts/journal/nf.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -main="/home/synchronous/journal/" +main="/home/synchronous/journal" #main_dir="$main/abstract" #main="/home/synchronous/code/nm/notes" main_dir="$main/rest" From 77b66a9babe93f07b9972472baf2ea9894e42cf8 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 16:31:29 -0400 Subject: [PATCH 30/45] 47 current 2025-04-30 16:31:24 25.05.20250424.f771eb4 6.12.24 * --- home/programs/nf/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home/programs/nf/default.nix b/home/programs/nf/default.nix index ecd90ac..a3cf446 100644 --- a/home/programs/nf/default.nix +++ b/home/programs/nf/default.nix @@ -6,6 +6,7 @@ }: { home.activation.makeNfDir = lib.mkAfter '' mkdir -p ~/journal + mkdir -p ~/journal/rest chmod -R u+w ~/journal ''; } From bb643f1911939d1beada046a1e91155bd44c8cb2 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 16:57:57 -0400 Subject: [PATCH 31/45] 48 current 2025-04-30 16:57:51 25.05.20250424.f771eb4 6.12.24 * --- home/scripts/journal/nf.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/scripts/journal/nf.sh b/home/scripts/journal/nf.sh index c05b7f1..ebd2923 100644 --- a/home/scripts/journal/nf.sh +++ b/home/scripts/journal/nf.sh @@ -27,7 +27,7 @@ search() { no_md="${rcv%.md}" replaced="${no_md//[-_]/ }" - echo "lol" + # echo "lol" alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \ -c "Goyo | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \ @@ -38,7 +38,7 @@ search() { open_daily() { alacritty -t "daily.md" -e nvim "$main/daily.md" \ - -c "Goyo | set path+=$main_dir" &! + -c "Goyo | set path+=$main_dir" \ -c "execute 'normal G'" } From c4e8d0a65bbd70edc425e4f48a2e05147b13f6fd Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 16:59:33 -0400 Subject: [PATCH 32/45] 49 current 2025-04-30 16:59:27 25.05.20250424.f771eb4 6.12.24 * --- home/scripts/journal/nf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/scripts/journal/nf.sh b/home/scripts/journal/nf.sh index ebd2923..81fdf90 100644 --- a/home/scripts/journal/nf.sh +++ b/home/scripts/journal/nf.sh @@ -39,7 +39,7 @@ search() { open_daily() { alacritty -t "daily.md" -e nvim "$main/daily.md" \ -c "Goyo | set path+=$main_dir" \ - -c "execute 'normal G'" + -c "execute 'normal G'" &! } open_todo() { From 2e16bd0740c91265fb31bb52c706c73aa230cb96 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 17:29:33 -0400 Subject: [PATCH 33/45] 50 current 2025-04-30 17:29:27 25.05.20250424.f771eb4 6.12.24 * --- home/programs/nvim/plugins/goyo.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/home/programs/nvim/plugins/goyo.lua b/home/programs/nvim/plugins/goyo.lua index 7692e06..fb9d6b7 100644 --- a/home/programs/nvim/plugins/goyo.lua +++ b/home/programs/nvim/plugins/goyo.lua @@ -12,3 +12,19 @@ vim.api.nvim_create_autocmd("VimResized", { end 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, +}) From cdab85a5212e4e83cc09b74d22eea4a303d6ada6 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 17:31:31 -0400 Subject: [PATCH 34/45] 51 current 2025-04-30 17:31:25 25.05.20250424.f771eb4 6.12.24 * --- home/programs/nvim/plugins/goyo.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/home/programs/nvim/plugins/goyo.lua b/home/programs/nvim/plugins/goyo.lua index fb9d6b7..1897aba 100644 --- a/home/programs/nvim/plugins/goyo.lua +++ b/home/programs/nvim/plugins/goyo.lua @@ -13,6 +13,9 @@ vim.api.nvim_create_autocmd("VimResized", { end, }) +local lualine = require('lualine') +local grp = vim.api.nvim_create_augroup('goyo_lualine_toggle', { clear = true }) + vim.api.nvim_create_autocmd('User', { group = grp, pattern = 'GoyoEnter', From fcedd2c6b036ce1684ab9e6c44ba05f88dea59c3 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 17:41:07 -0400 Subject: [PATCH 35/45] 52 current 2025-04-30 17:41:01 25.05.20250424.f771eb4 6.12.24 * --- home/programs/nvim/plugins/goyo.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/home/programs/nvim/plugins/goyo.lua b/home/programs/nvim/plugins/goyo.lua index 1897aba..e68dfa0 100644 --- a/home/programs/nvim/plugins/goyo.lua +++ b/home/programs/nvim/plugins/goyo.lua @@ -13,9 +13,15 @@ vim.api.nvim_create_autocmd("VimResized", { 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', @@ -31,3 +37,13 @@ vim.api.nvim_create_autocmd('User', { lualine.hide({ place = {'statusline', 'winbar', 'tabline'}, unhide = true }) end, }) + +vim.api.nvim_create_autocmd('VimEnter', { + group = grp, + once = true, + callback = function() + if vim.fn.exists('g:goyo_width') == 1 then + vim.schedule(hide) + end + end, +}) From b0fcd74f59f3ae43806085198ffddfb9358a4885 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 17:44:10 -0400 Subject: [PATCH 36/45] 53 current 2025-04-30 17:44:04 25.05.20250424.f771eb4 6.12.24 * --- home/programs/nvim/plugins/goyo.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/programs/nvim/plugins/goyo.lua b/home/programs/nvim/plugins/goyo.lua index e68dfa0..06325fc 100644 --- a/home/programs/nvim/plugins/goyo.lua +++ b/home/programs/nvim/plugins/goyo.lua @@ -18,8 +18,8 @@ vim.api.nvim_create_autocmd("VimResized", { 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 +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', { From 33aede19715e878fbc5bada0344b7de9bf0588cb Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 17:58:06 -0400 Subject: [PATCH 37/45] 54 current 2025-04-30 17:58:00 25.05.20250424.f771eb4 6.12.24 * --- home/programs/nvim/plugins/goyo.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/home/programs/nvim/plugins/goyo.lua b/home/programs/nvim/plugins/goyo.lua index 06325fc..bfc163b 100644 --- a/home/programs/nvim/plugins/goyo.lua +++ b/home/programs/nvim/plugins/goyo.lua @@ -42,7 +42,8 @@ vim.api.nvim_create_autocmd('VimEnter', { group = grp, once = true, callback = function() - if vim.fn.exists('g:goyo_width') == 1 then + local w = vim.g.goyo_if + if w then vim.schedule(hide) end end, From 86c8b188162bc1d5c0be0f2e1529c5d6491c3c71 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 19:58:51 -0400 Subject: [PATCH 38/45] 55 current 2025-04-30 19:58:44 25.05.20250424.f771eb4 6.12.24 * --- home/programs/nvim/plugins/goyo.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/home/programs/nvim/plugins/goyo.lua b/home/programs/nvim/plugins/goyo.lua index bfc163b..06a2729 100644 --- a/home/programs/nvim/plugins/goyo.lua +++ b/home/programs/nvim/plugins/goyo.lua @@ -44,6 +44,7 @@ vim.api.nvim_create_autocmd('VimEnter', { callback = function() local w = vim.g.goyo_if if w then + vim.cmd 'BarbarDisable' vim.schedule(hide) end end, From 2a766023629fa19a4ab4a33a6425b86efd5c5285 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 20:02:24 -0400 Subject: [PATCH 39/45] 56 current 2025-04-30 20:02:17 25.05.20250424.f771eb4 6.12.24 * --- home/programs/nvim/plugins/goyo.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/home/programs/nvim/plugins/goyo.lua b/home/programs/nvim/plugins/goyo.lua index 06a2729..438b11b 100644 --- a/home/programs/nvim/plugins/goyo.lua +++ b/home/programs/nvim/plugins/goyo.lua @@ -44,7 +44,9 @@ vim.api.nvim_create_autocmd('VimEnter', { callback = function() local w = vim.g.goyo_if if w then - vim.cmd 'BarbarDisable' + vim.schedule( + vim.cmd 'BarbarDisable' + end) vim.schedule(hide) end end, From 9d10d65c6395fedc43b0b5f2acdc04d76448eb00 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 20:05:19 -0400 Subject: [PATCH 40/45] 57 current 2025-04-30 20:05:12 25.05.20250424.f771eb4 6.12.24 * --- home/programs/nvim/plugins/goyo.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/programs/nvim/plugins/goyo.lua b/home/programs/nvim/plugins/goyo.lua index 438b11b..5b0aeeb 100644 --- a/home/programs/nvim/plugins/goyo.lua +++ b/home/programs/nvim/plugins/goyo.lua @@ -44,8 +44,8 @@ vim.api.nvim_create_autocmd('VimEnter', { callback = function() local w = vim.g.goyo_if if w then - vim.schedule( - vim.cmd 'BarbarDisable' + vim.schedule(function() + vim.cmd('BarbarDisable') end) vim.schedule(hide) end From ab9069d30b61d33f8f4f972becf598224ba903bf Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 20:36:29 -0400 Subject: [PATCH 41/45] 58 current 2025-04-30 20:36:21 25.05.20250424.f771eb4 6.12.24 * --- home/programs/nvim/plugins/goyo.lua | 15 ++++++++++++--- home/programs/sxhkd/sxhkdrc | 11 +++++++---- home/scripts/journal/nf.sh | 24 ++++++++++++++++-------- 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/home/programs/nvim/plugins/goyo.lua b/home/programs/nvim/plugins/goyo.lua index 5b0aeeb..6048bbb 100644 --- a/home/programs/nvim/plugins/goyo.lua +++ b/home/programs/nvim/plugins/goyo.lua @@ -44,10 +44,19 @@ vim.api.nvim_create_autocmd('VimEnter', { callback = function() local w = vim.g.goyo_if if w then - vim.schedule(function() - vim.cmd('BarbarDisable') - end) 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, +}) diff --git a/home/programs/sxhkd/sxhkdrc b/home/programs/sxhkd/sxhkdrc index e15196d..ce6ab42 100644 --- a/home/programs/sxhkd/sxhkdrc +++ b/home/programs/sxhkd/sxhkdrc @@ -185,14 +185,16 @@ super + {o} # open my notes without goyo and with nvimteee super + {shift} + {o} - alacritty -e nvim /home/synchronous/journal/Daily.md -c "execute 'normal G' | NvimTreeOpen /home/synchronous/journal" + # alacritty -e nvim /home/synchronous/journal/Daily.md -c "execute 'normal G' | NvimTreeOpen /home/synchronous/journal" + nf daily # search my notes using rofi and open the right one super + {ctrl} + {o} - sh /home/synchronous/.scripts/vimwiki/search_notes.sh + # sh /home/synchronous/.scripts/vimwiki/search_notes.sh + nf search super + {ctrl} + {p} - sh /home/synchronous/.scripts/papers/paper-search-cached.sh + # sh /home/synchronous/.scripts/papers/paper-search-cached.sh super + {ctrl} + {l} sh /home/synchronous/.scripts/papers/paper-search.sh @@ -211,7 +213,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 super + {p} - sh /home/synchronous/.scripts/vimwiki/open_todo.sh + # sh /home/synchronous/.scripts/vimwiki/open_todo.sh + nf todo super + {m} sh /home/synchronous/.scripts/vimwiki/open-learning.sh diff --git a/home/scripts/journal/nf.sh b/home/scripts/journal/nf.sh index 81fdf90..df0a916 100644 --- a/home/scripts/journal/nf.sh +++ b/home/scripts/journal/nf.sh @@ -13,7 +13,8 @@ search() { 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 "Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" &! + -c "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 :call CustomGf()" \ @@ -31,7 +32,8 @@ search() { alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \ -c "Goyo | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \ - -c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" &! + -c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" \ + -c "lua vim.g.goyo_if = 1" &! # make sure standardized frontmatter is there fi } @@ -39,12 +41,14 @@ search() { open_daily() { alacritty -t "daily.md" -e nvim "$main/daily.md" \ -c "Goyo | set path+=$main_dir" \ - -c "execute 'normal G'" &! + -c "execute 'normal G'" \ + -c "lua vim.g.goyo_if = 1" &! } open_todo() { alacritty -t "todo.md" -e nvim "$main/todo.md" \ - -c "Goyo | set path+=$main_dir" &! + -c "Goyo | set path+=$main_dir" \ + -c "lua vim.g.goyo_if = 1" &! # -c "execute 'normal G'" } @@ -82,7 +86,8 @@ search_by_tags() { 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 "Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" &! + -c "Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \ + -c "lua vim.g.goyo_if = 1" &! else # if rcv doesn't contain md, add it @@ -95,7 +100,8 @@ search_by_tags() { alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \ -c "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 + -c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" \ + -c "lua vim.g.goyo_if = 1" &! fi } @@ -133,7 +139,8 @@ search_by_title() { # echo "$rcv" if [[ $(echo "$rs" | rg "$rcv") ]]; then # check if we actually have our note alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \ - -c "Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" &! + -c "Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \ + -c "lua vim.g.goyo_if = 1" &! else # if rcv doesn't contain md, add it @@ -146,7 +153,8 @@ search_by_title() { alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \ -c "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 + -c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" \ + -c "lua vim.g.goyo_if = 1" &! fi } From 1ea94c3892acf70280b7b4e6741612a9f1830be3 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 20:39:54 -0400 Subject: [PATCH 42/45] 59 current 2025-04-30 20:39:46 25.05.20250424.f771eb4 6.12.24 * --- home/programs/sxhkd/sxhkdrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home/programs/sxhkd/sxhkdrc b/home/programs/sxhkd/sxhkdrc index ce6ab42..565e568 100644 --- a/home/programs/sxhkd/sxhkdrc +++ b/home/programs/sxhkd/sxhkdrc @@ -181,17 +181,17 @@ super + bracket{left,right} # 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 super + {o} - open_daily + sh nf daily # open my notes without goyo and with nvimteee super + {shift} + {o} # alacritty -e nvim /home/synchronous/journal/Daily.md -c "execute 'normal G' | NvimTreeOpen /home/synchronous/journal" - nf daily + sh nf daily # search my notes using rofi and open the right one super + {ctrl} + {o} # sh /home/synchronous/.scripts/vimwiki/search_notes.sh - nf search + sh nf search super + {ctrl} + {p} # sh /home/synchronous/.scripts/papers/paper-search-cached.sh From 93830fe8b5fc33973bb17fb9ae3a0ca0f09f4cb2 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 30 Apr 2025 20:54:53 -0400 Subject: [PATCH 43/45] 60 current 2025-04-30 20:54:46 25.05.20250424.f771eb4 6.12.24 * --- home/programs/sxhkd/sxhkdrc | 4 +--- home/scripts/journal/nf.sh | 30 ++++++++++++------------------ 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/home/programs/sxhkd/sxhkdrc b/home/programs/sxhkd/sxhkdrc index 565e568..3788ccc 100644 --- a/home/programs/sxhkd/sxhkdrc +++ b/home/programs/sxhkd/sxhkdrc @@ -185,15 +185,13 @@ super + {o} # open my notes without goyo and with nvimteee 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 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 super + {ctrl} + {l} diff --git a/home/scripts/journal/nf.sh b/home/scripts/journal/nf.sh index df0a916..8fb240b 100644 --- a/home/scripts/journal/nf.sh +++ b/home/scripts/journal/nf.sh @@ -8,13 +8,13 @@ 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 + 49))"- | rg -a '\.md$')" + 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 "Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \ - -c "lua vim.g.goyo_if = 1" &! + -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 :call CustomGf()" \ @@ -31,9 +31,8 @@ search() { # echo "lol" alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \ - -c "Goyo | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \ - -c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" \ - -c "lua vim.g.goyo_if = 1" &! + -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 } @@ -47,8 +46,7 @@ open_daily() { open_todo() { alacritty -t "todo.md" -e nvim "$main/todo.md" \ - -c "Goyo | set path+=$main_dir" \ - -c "lua vim.g.goyo_if = 1" &! + -c "execute 'lua vim.g.goyo_if = 1' | Goyo | set path+=$main_dir" &! # -c "execute 'normal G'" } @@ -86,8 +84,7 @@ search_by_tags() { 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 "Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \ - -c "lua vim.g.goyo_if = 1" &! + -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 @@ -99,9 +96,8 @@ search_by_tags() { replaced="${no_md//[-_]/ }" alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \ - -c "Goyo | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \ - -c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" \ - -c "lua vim.g.goyo_if = 1" &! + -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 } @@ -139,8 +135,7 @@ search_by_title() { # echo "$rcv" if [[ $(echo "$rs" | rg "$rcv") ]]; then # check if we actually have our note alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \ - -c "Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \ - -c "lua vim.g.goyo_if = 1" &! + -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 @@ -152,9 +147,8 @@ search_by_title() { replaced="${no_md//[-_]/ }" alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \ - -c "Goyo | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \ - -c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" \ - -c "lua vim.g.goyo_if = 1" &! + -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 } From 61d1134fedfe2624e6f7e14ad531060cddc107e9 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Fri, 2 May 2025 05:45:03 -0400 Subject: [PATCH 44/45] 60 current 2025-04-30 20:54:46 25.05.20250424.f771eb4 6.12.24 * --- flake.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index f2b9c0e..fe5b17e 100644 --- a/flake.nix +++ b/flake.nix @@ -28,9 +28,9 @@ agenix, }: let baseModule = { - imports = [ - home-manager.nixosModules.default - ]; + # imports = [ + # home-manager.nixosModules.default + # ]; system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; nixpkgs.overlays = []; }; @@ -43,7 +43,7 @@ { environment.systemPackages = [agenix.packages.x86_64-linux.default]; } - + home-manager.nixosModules.default agenix.nixosModules.default # agenix.homeManagerModules.age ./hosts/thonkpad/configuration.nix From b0b25c561a51f0e9c68ca8c24ff767ac34e6c2ed Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Fri, 2 May 2025 05:52:13 -0400 Subject: [PATCH 45/45] 60 current 2025-04-30 20:54:46 25.05.20250424.f771eb4 6.12.24 * --- hosts/thonkpad/configuration.nix | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/hosts/thonkpad/configuration.nix b/hosts/thonkpad/configuration.nix index ee4794b..3eae7e4 100644 --- a/hosts/thonkpad/configuration.nix +++ b/hosts/thonkpad/configuration.nix @@ -34,17 +34,18 @@ in { 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; - }) - ]; + # extraSpecialArgs = {inherit (config);}; + # users.synchronous.imports = [ + # ({ + # config, + # lib, + # ... + # }: + # import ../../home/home.nix { + # inherit config pkgs lib; + # }) + # ]; + users.synchronous.imports = [../../home/home.nix]; }; res = "1366x768";