From 39a0b2e5d05d99b6bea1f93dd04b2a9ab412b517 Mon Sep 17 00:00:00 2001 From: Madeleine Date: Wed, 29 Mar 2023 06:58:29 +0100 Subject: [PATCH] began reorganising --- flake.lock | 12 +++--- flake.nix | 40 ++++++++++++------- maddie/git.nix | 2 +- maddie/messaging.nix | 2 +- maddie/passwords.nix | 5 +++ {system => systems/desktop}/android.nix | 0 {system => systems/desktop}/audio.nix | 0 {system => systems/desktop}/bluetooth.nix | 0 {system => systems/desktop}/boot.nix | 0 {system => systems/desktop}/cpu.nix | 0 {system => systems/desktop}/disks.nix | 0 {system => systems/desktop}/doas.nix | 0 {system => systems/desktop}/firewall.nix | 0 {system => systems/desktop}/fonts.nix | 0 {system => systems/desktop}/gpg.nix | 0 {system => systems/desktop}/locale.nix | 0 {system => systems/desktop}/networking.nix | 0 {system => systems/desktop}/nix.nix | 0 {system => systems/desktop}/nixos.nix | 0 {system => systems/desktop}/nvidia.nix | 0 {system => systems/desktop}/packages.nix | 0 {system => systems/desktop}/security.nix | 0 {system => systems/desktop}/services.nix | 0 {system => systems/desktop}/ssh.nix | 0 {system => systems/desktop}/systemd.nix | 0 {system => systems/desktop}/users.nix | 0 .../desktop}/virtualisation.nix | 0 {system => systems/desktop}/xorg.nix | 0 {system => systems/desktop}/yubikey.nix | 2 +- {system => systems/desktop}/zsh.nix | 0 30 files changed, 39 insertions(+), 24 deletions(-) rename {system => systems/desktop}/android.nix (100%) rename {system => systems/desktop}/audio.nix (100%) rename {system => systems/desktop}/bluetooth.nix (100%) rename {system => systems/desktop}/boot.nix (100%) rename {system => systems/desktop}/cpu.nix (100%) rename {system => systems/desktop}/disks.nix (100%) rename {system => systems/desktop}/doas.nix (100%) rename {system => systems/desktop}/firewall.nix (100%) rename {system => systems/desktop}/fonts.nix (100%) rename {system => systems/desktop}/gpg.nix (100%) rename {system => systems/desktop}/locale.nix (100%) rename {system => systems/desktop}/networking.nix (100%) rename {system => systems/desktop}/nix.nix (100%) rename {system => systems/desktop}/nixos.nix (100%) rename {system => systems/desktop}/nvidia.nix (100%) rename {system => systems/desktop}/packages.nix (100%) rename {system => systems/desktop}/security.nix (100%) rename {system => systems/desktop}/services.nix (100%) rename {system => systems/desktop}/ssh.nix (100%) rename {system => systems/desktop}/systemd.nix (100%) rename {system => systems/desktop}/users.nix (100%) rename {system => systems/desktop}/virtualisation.nix (100%) rename {system => systems/desktop}/xorg.nix (100%) rename {system => systems/desktop}/yubikey.nix (92%) rename {system => systems/desktop}/zsh.nix (100%) diff --git a/flake.lock b/flake.lock index a518439..471748a 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1678109311, - "narHash": "sha256-Q64FoCH5rp3XHoC8u1+KyjLEFGTY7kX9YaIaYfugvfY=", + "lastModified": 1679480702, + "narHash": "sha256-npuRD61YmxUPitI1TqKwlxLrU6iGl5E+BPT196LgUDo=", "owner": "nix-community", "repo": "home-manager", - "rev": "04d6cad67557512452decbfe888c68fa11338a96", + "rev": "363c46b2480f1b73ec37cf68caac61f5daa82a2e", "type": "github" }, "original": { @@ -23,11 +23,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1678116888, - "narHash": "sha256-/Y4RTkPq+RVJjkoM/mYyCREFLZhvtISc/rLcgM1vLvo=", + "lastModified": 1679614379, + "narHash": "sha256-2KddLHHmcIlJu0PuS/vISLKxihTyICUwKWGn0R//028=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "49596eb4e50b18337aad3b73317371bcd4e3b047", + "rev": "994e2ef9e9c70b4dd7257f73452a94e871723685", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 13ed6b9..5699c84 100644 --- a/flake.nix +++ b/flake.nix @@ -9,26 +9,36 @@ outputs = { self, nixpkgs, home-manager }: let - username = "spy"; - system = "x86_64-linux"; + username = "maddie"; pkgs = import nixpkgs { inherit system; config.allowUnfree = true; overlays = import ./overlays.nix; }; utils = import ./utils pkgs; specialArgs = { inherit username; inherit pkgs; }; in { - packages.${system} = { - nixosConfigurations.luna = nixpkgs.lib.nixosSystem { - inherit system; - inherit pkgs; - inherit specialArgs; - modules = [ - home-manager.nixosModules.home-manager - { - home-manager.users.${username}.imports = utils.nixFilesIn ./maddie; - home-manager.extraSpecialArgs = specialArgs; - } - ] ++ utils.nixFilesIn ./system; - }; + nixosConfigurations.luna = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + inherit pkgs; + inherit specialArgs; + modules = [ + home-manager.nixosModules.home-manager + { + home-manager.users.${username}.imports = utils.nixFilesIn ./maddie; + home-manager.extraSpecialArgs = specialArgs; + } + ] ++ utils.nixFilesIn ./systems/desktop; + }; + + darwinConfigurations."MMacBookPro" = inputs.darwin.lib.darwinSystem { + inherit pkgs; + inherit specialArgs; + system = "aarch64-darwin", + modules = [ + home-manager.darwinModules.home-manager + { + home-manager.users.${username}.imports = utils.nixFilesIn ./maddie; + home-manager.extraSpecialArgs = specialArgs; + } + ] ++ utils.nixFilesIn ./systems/macbookpro; }; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt; diff --git a/maddie/git.nix b/maddie/git.nix index 8e19adc..5aaeb0b 100644 --- a/maddie/git.nix +++ b/maddie/git.nix @@ -18,7 +18,7 @@ userName = "Madeleine"; userEmail = "maddie@spyhoodle.me"; signing = { - key = "467EFD918D5E770AD1EE2CE699CD1AB536E1C7AD"; + key = "FA50688B9EB6D8AA070C8241C296DE8C9053683F"; signByDefault = true; gpgPath = "gpg2"; }; diff --git a/maddie/messaging.nix b/maddie/messaging.nix index 290f13e..1f8bd2a 100644 --- a/maddie/messaging.nix +++ b/maddie/messaging.nix @@ -2,9 +2,9 @@ { home.packages = with pkgs; [ + element-desktop # Matrix client signal-desktop # Signal client discord-canary # Discord client ripcord # Better discord client - element # Matrix client ]; } diff --git a/maddie/passwords.nix b/maddie/passwords.nix index c43e87d..9575900 100644 --- a/maddie/passwords.nix +++ b/maddie/passwords.nix @@ -11,4 +11,9 @@ home.sessionVariables = { PASSWORD_STORE_DIR = "${config.xdg.dataHome}/password-store"; }; + + services.pass-secret-service = { + enable = true; + storePath = "${config.xdg.dataHome}/password-store"; + }; } diff --git a/system/android.nix b/systems/desktop/android.nix similarity index 100% rename from system/android.nix rename to systems/desktop/android.nix diff --git a/system/audio.nix b/systems/desktop/audio.nix similarity index 100% rename from system/audio.nix rename to systems/desktop/audio.nix diff --git a/system/bluetooth.nix b/systems/desktop/bluetooth.nix similarity index 100% rename from system/bluetooth.nix rename to systems/desktop/bluetooth.nix diff --git a/system/boot.nix b/systems/desktop/boot.nix similarity index 100% rename from system/boot.nix rename to systems/desktop/boot.nix diff --git a/system/cpu.nix b/systems/desktop/cpu.nix similarity index 100% rename from system/cpu.nix rename to systems/desktop/cpu.nix diff --git a/system/disks.nix b/systems/desktop/disks.nix similarity index 100% rename from system/disks.nix rename to systems/desktop/disks.nix diff --git a/system/doas.nix b/systems/desktop/doas.nix similarity index 100% rename from system/doas.nix rename to systems/desktop/doas.nix diff --git a/system/firewall.nix b/systems/desktop/firewall.nix similarity index 100% rename from system/firewall.nix rename to systems/desktop/firewall.nix diff --git a/system/fonts.nix b/systems/desktop/fonts.nix similarity index 100% rename from system/fonts.nix rename to systems/desktop/fonts.nix diff --git a/system/gpg.nix b/systems/desktop/gpg.nix similarity index 100% rename from system/gpg.nix rename to systems/desktop/gpg.nix diff --git a/system/locale.nix b/systems/desktop/locale.nix similarity index 100% rename from system/locale.nix rename to systems/desktop/locale.nix diff --git a/system/networking.nix b/systems/desktop/networking.nix similarity index 100% rename from system/networking.nix rename to systems/desktop/networking.nix diff --git a/system/nix.nix b/systems/desktop/nix.nix similarity index 100% rename from system/nix.nix rename to systems/desktop/nix.nix diff --git a/system/nixos.nix b/systems/desktop/nixos.nix similarity index 100% rename from system/nixos.nix rename to systems/desktop/nixos.nix diff --git a/system/nvidia.nix b/systems/desktop/nvidia.nix similarity index 100% rename from system/nvidia.nix rename to systems/desktop/nvidia.nix diff --git a/system/packages.nix b/systems/desktop/packages.nix similarity index 100% rename from system/packages.nix rename to systems/desktop/packages.nix diff --git a/system/security.nix b/systems/desktop/security.nix similarity index 100% rename from system/security.nix rename to systems/desktop/security.nix diff --git a/system/services.nix b/systems/desktop/services.nix similarity index 100% rename from system/services.nix rename to systems/desktop/services.nix diff --git a/system/ssh.nix b/systems/desktop/ssh.nix similarity index 100% rename from system/ssh.nix rename to systems/desktop/ssh.nix diff --git a/system/systemd.nix b/systems/desktop/systemd.nix similarity index 100% rename from system/systemd.nix rename to systems/desktop/systemd.nix diff --git a/system/users.nix b/systems/desktop/users.nix similarity index 100% rename from system/users.nix rename to systems/desktop/users.nix diff --git a/system/virtualisation.nix b/systems/desktop/virtualisation.nix similarity index 100% rename from system/virtualisation.nix rename to systems/desktop/virtualisation.nix diff --git a/system/xorg.nix b/systems/desktop/xorg.nix similarity index 100% rename from system/xorg.nix rename to systems/desktop/xorg.nix diff --git a/system/yubikey.nix b/systems/desktop/yubikey.nix similarity index 92% rename from system/yubikey.nix rename to systems/desktop/yubikey.nix index 46d9af9..9c128a3 100644 --- a/system/yubikey.nix +++ b/systems/desktop/yubikey.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: { - services.pcscd.enable = false; + services.pcscd.enable = true; services.udev.packages = [ pkgs.yubikey-personalization pkgs.android-udev-rules ]; security.pam = { services = { diff --git a/system/zsh.nix b/systems/desktop/zsh.nix similarity index 100% rename from system/zsh.nix rename to systems/desktop/zsh.nix