From e0123eae556eb50b123d3d7aacbf89d93d370809 Mon Sep 17 00:00:00 2001 From: Michael Thomson Date: Wed, 24 Apr 2024 01:19:44 -0400 Subject: [PATCH] desktop --- flake.nix | 4 ++-- hosts/{nixos => desktop}/configuration.nix | 2 +- .../hardware-configuration.nix | 6 +++--- hosts/{nixos => desktop}/home.nix | 4 ++-- modules/home-manager/1password/default.nix | 16 ++++++++++++++++ modules/home-manager/git/default.nix | 9 +++++++++ 6 files changed, 33 insertions(+), 8 deletions(-) rename hosts/{nixos => desktop}/configuration.nix (98%) rename hosts/{nixos => desktop}/hardware-configuration.nix (87%) rename hosts/{nixos => desktop}/home.nix (89%) create mode 100644 modules/home-manager/1password/default.nix create mode 100644 modules/home-manager/git/default.nix diff --git a/flake.nix b/flake.nix index b3b9331..83fe353 100644 --- a/flake.nix +++ b/flake.nix @@ -15,11 +15,11 @@ outputs = inputs@{ self, nixpkgs, home-manager, nix-darwin, ... }: { nixosConfigurations = { - nixos = nixpkgs.lib.nixosSystem { + desktop = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ - ./hosts/nixos/configuration.nix + ./hosts/desktop/configuration.nix ]; }; }; diff --git a/hosts/nixos/configuration.nix b/hosts/desktop/configuration.nix similarity index 98% rename from hosts/nixos/configuration.nix rename to hosts/desktop/configuration.nix index d87fb93..aaa68e2 100644 --- a/hosts/nixos/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -15,7 +15,7 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - networking.hostName = "nixos"; # Define your hostname. + networking.hostName = "desktop"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Enable networking diff --git a/hosts/nixos/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix similarity index 87% rename from hosts/nixos/hardware-configuration.nix rename to hosts/desktop/hardware-configuration.nix index ae9358f..3508a3f 100644 --- a/hosts/nixos/hardware-configuration.nix +++ b/hosts/desktop/hardware-configuration.nix @@ -14,17 +14,17 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/96c63add-dc4b-473e-9273-db9e281f3004"; + { device = "/dev/disk/by-uuid/4dc20e43-03f8-4695-8bb5-ad9974215ac8"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/A240-8690"; + { device = "/dev/disk/by-uuid/7F11-62C6"; fsType = "vfat"; }; swapDevices = - [ { device = "/dev/disk/by-uuid/3b38e555-ddc9-41ae-a3c7-49a20a2c5295"; } + [ { device = "/dev/disk/by-uuid/51bbac0f-6f93-45ff-92b5-fea4d110c138"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking diff --git a/hosts/nixos/home.nix b/hosts/desktop/home.nix similarity index 89% rename from hosts/nixos/home.nix rename to hosts/desktop/home.nix index ee6a99d..438db58 100644 --- a/hosts/nixos/home.nix +++ b/hosts/desktop/home.nix @@ -3,6 +3,8 @@ { imports = [ ../../modules/home-manager/i3 + ../../modules/home-manager/1password + ../../modules/home-manager/git ../../modules/home-manager/neovim ../../modules/home-manager/wezterm ../../modules/home-manager/zsh @@ -19,7 +21,6 @@ home.packages = with pkgs; [ firefox - _1password-gui gcc fzf ripgrep @@ -27,5 +28,4 @@ ]; programs.home-manager.enable = true; - programs.git.enable = true; } diff --git a/modules/home-manager/1password/default.nix b/modules/home-manager/1password/default.nix new file mode 100644 index 0000000..ac730e9 --- /dev/null +++ b/modules/home-manager/1password/default.nix @@ -0,0 +1,16 @@ +{ pkgs, config, ... }: + +{ + home.packages = with pkgs; [ + _1password + _1password-gui + ]; + + programs.ssh = { + enable = true; + extraConfig = '' + Host * + IdentityAgent ~/.1password/agent.sock + ''; + }; +} diff --git a/modules/home-manager/git/default.nix b/modules/home-manager/git/default.nix new file mode 100644 index 0000000..76a9e6f --- /dev/null +++ b/modules/home-manager/git/default.nix @@ -0,0 +1,9 @@ +{ pkgs, config, ... }: + +{ + programs.git = { + enable = true; + userName = "Michael Thomson"; + userEmail = "michael@michaelthomson.dev"; + }; +}