diff --git a/flake.nix b/flake.nix index b4a2d7c..831b248 100644 --- a/flake.nix +++ b/flake.nix @@ -11,12 +11,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - nix-on-droid = { - url = "github:nix-community/nix-on-droid"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.home-manager.follows = "home-manager"; - }; - disko = { url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; @@ -41,154 +35,151 @@ #nixvim.url = "git+https://gitea.esotericbytes.com/Blunkall-Technologies/Moirai"; nixvim.url = "git+ssh://gitea@gitea.esotericbytes.com/Blunkall-Technologies/Moirai"; - }; outputs = { self, nixpkgs, home-manager, ... } @ inputs: { + profiles = let + dir = builtins.readDir ./system/profiles; + filtered = builtins.filter (x: dir.${x} == "directory") (builtins.attrNames dir); + in (builtins.listToAttrs + (builtins.map + (name: ({ + inherit name; + + value = { ... }: { + imports = [ + ./system + ./system/profiles/${name} + ]; + }; + })) filtered) + ); - nixosConfigurations = { + homes = let + dir = builtins.readDir ./system/users; + filtered = builtins.filter (x: dir.${x} == "directory") (builtins.attrNames dir); + in (builtins.listToAttrs + (builtins.map + (name: ({ + inherit name; + + value = { ... }: { + imports = [ + ./system/users/${name}/home-manager + ]; + }; + })) filtered) + ); - homebox = nixpkgs.lib.nixosSystem { - specialArgs = { - inputs = inputs // { - nathan = import ./home-manager/users/nathan; - home-manager-config = import ./home-manager; - inherit self; - }; - }; - modules = [ - ./system-config/configuration/homebox - ./system-config - ]; - }; - - laptop = nixpkgs.lib.nixosSystem { - specialArgs = { - inputs = inputs // { - nathan = import ./home-manager/users/nathan; - home-manager-config = import ./home-manager; - inherit self; - }; - }; - modules = [ - ./system-config/configuration/laptop - ./system-config - ]; - }; - - jesstop = nixpkgs.lib.nixosSystem { - specialArgs = { - inputs = inputs // { - }; - }; - modules = [ - ./system-config/configuration/jesstop - ./system-config - ]; - }; - - pi4 = { - system = "aarch64-linux"; - specialArgs = { - inputs = inputs // { - nathan = import ./home-manager/users/nathan; - home-manager-config = import ./home-manager; - inherit self; - }; - }; - modules = [ - ./system-config/configuration/pi4 - ./system-config - ]; - }; - - live = nixpkgs.lib.nixosSystem { - specialArgs = { - inputs = inputs // { - nathan = import ./home-manager/users/nathan; - home-manager-config = import ./home-manager; - inherit self; - }; - }; - modules = [ - ./system-config/configuration/live - ./system-config - ]; - }; - - container = nixpkgs.lib.nixosSystem { - specialArgs = { - inputs = inputs // { - nathan = import ./home-manager/users/nathan; - home-manager-config = import ./home-manager; - inherit self; - }; - }; - modules = [ - ./system-config/configuration/containers/nathan - ./system-config - ]; - }; - - iso = nixpkgs.lib.nixosSystem { + iso = (nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inputs = inputs // { - nathan = import ./home-manager/users/nathan; - home-manager-config = import ./home-manager; + nathan = self.homes.nathan; inherit self; }; }; modules = [ - ./system-config/configuration/iso - ./system-config + self.profiles.iso ]; - }; - }; + }).config.system.build.isoImage; + + templates = { + nixos = { + welcomeText = '' + #Welcome to Olympus! + Have Fun! + ''; + + description = '' + Generate this where you want your config. + ''; + + source = ./templates/nixos; - nixOnDroidConfigurations.default = inputs.nix-on-droid.lib.nixOnDroidConfiguration { - pkgs = import nixpkgs { - system = "aarch64-linux"; - overlays = [ inputs.nix-on-droid.overlays.default ]; }; - modules = [ - ./system-config/configuration/android - ]; + home-manager = { + welcomeText = '' + #Welcome to Olympus! + Have Fun! + ''; + + description = '' + Generate this where you want your config. + ''; + + source = ./templates/home-manager; - extraSpecialArgs = { - inputs = inputs // { - nathan = import ./home-manager/users/nathan; - home-manager-config = import ./home-manager; - }; }; - }; + nix-on-droid = { + welcomeText = '' + #Welcome to Olympus! + Have Fun! + ''; - homeConfigurations = { - nathan = home-manager.lib.homeManagerConfiguration { - pkgs = import nixpkgs { - system = builtins.currentSystem; - }; + description = '' + Generate this where you want your config. + ''; - modules = [ - ./home-manager - { - homeconfig = { - username = "nathan"; - graphical = false; - minimal = false; + source = ./templates/nix-on-droid; + + }; + + machines = let + dir = builtins.readDir ./machines; + filtered = builtins.filter (x: dir.${x} == "directory") (builtins.attrNames dir); + in (builtins.listToAttrs + (builtins.map + (name: ({ + inherit name; + + value = { + welcomeText = '' + #Welcome to Olympus! + + ##Warning: + This is a config for ${name}, an established machine! + It may require significant alterations to be usable! + ''; + + description = '' + Generate this where you want your config. + ''; + + source = ./machines/${name}; }; - } - ]; - extraSpecialArgs = { - inherit inputs; - }; - }; + })) filtered) + ); + + homes = let + dir = builtins.readDir ./homes; + filtered = builtins.filter (x: dir.${x} == "directory") (builtins.attrNames dir); + in (builtins.listToAttrs + (builtins.map + (name: ({ + inherit name; + + value = { + welcomeText = '' + #Welcome home, ${name}! + Your config is right here. + ''; + + description = '' + Generate this where you want your config. + ''; + + source = ./homes/${name}; + }; + + })) filtered) + ); + + default = self.templates.nixos; }; - - iso = self.nixosConfigurations.iso.config.system.build.isoImage; }; } diff --git a/home-manager/default.nix b/home-manager/default.nix deleted file mode 100644 index 83d45c8..0000000 --- a/home-manager/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ config, lib, ... }: { - - imports = [ - ]; - - options.homeconfig = with lib; { - host = mkOption { - type = with types; nullOr str; - default = null; - }; - - name = mkOption { - type = with types; nullOr str; - default = null; - }; - - graphical = mkOption { - type = with types; bool; - default = true; - }; - - standalone.enable = mkOption { - type = with types; bool; - default = false; - }; - }; - - config = { - - home.username = lib.mkDefault config.homeconfig.name; - - home.homeDirectory = lib.mkDefault "/home/${config.home.username}"; - - programs.home-manager.enable = config.homeconfig.standalone.enable; - }; -} diff --git a/homes/nathan/flake.nix b/homes/nathan/flake.nix new file mode 100644 index 0000000..d010e83 --- /dev/null +++ b/homes/nathan/flake.nix @@ -0,0 +1,40 @@ +{ + + description = "Home-Manager Configuration"; + + inputs = { + + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; + + home-manager = { + url = "github:nix-community/home-manager/release-25.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + olympus = { + url = "git+ssh://gitea@esotericbytes.com/Blunkall-Technologies/Olympus"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; + }; + + outputs = { self, nixpkgs, home-manager, olympus, ... } @ inputs: { + + homeConfigurations = { + nathan = home-manager.lib.homeManagerConfiguration { + pkgs = import nixpkgs { + system = builtins.currentSystem; + }; + + modules = [ + olympus.homes.nathan + ./home.nix + ]; + + extraSpecialArgs = { + inherit inputs; + }; + }; + }; + }; +} diff --git a/homes/nathan/home.nix b/homes/nathan/home.nix new file mode 100644 index 0000000..9003ff1 --- /dev/null +++ b/homes/nathan/home.nix @@ -0,0 +1,11 @@ +{ ... }: + +{ + + config = { + homeconfig = { + graphical = false; + minimal = false; + }; + }; + } diff --git a/machines/android/.sops.yaml b/machines/android/.sops.yaml new file mode 100644 index 0000000..0a2ab72 --- /dev/null +++ b/machines/android/.sops.yaml @@ -0,0 +1,33 @@ +keys: + - &homebox age1640eg0pnmkruc89m5xguz0m8fek44fl4tzez6qwuzlz6kmapqewsp8esxd + - &laptop age1yqgyp2uxz4lzrc9f9ka0mfjl5fr6ahf8nf24nlmran2wulg6fpvq9hyp9q + - &android age12pnf36uqesjmy3e0lythfnpwam3zg5mv8m936fc4jphy4ces2fdqwn0s74 +creation_rules: + - path_regex: homebox/secrets.yaml$ + key_groups: + - age: + - *homebox + - path_regex: laptop/secrets.yaml$ + key_groups: + - age: + - *laptop + - path_regex: pi4/secrets.yaml$ + key_groups: + - age: + - *laptop + - path_regex: live/secrets.yaml$ + key_groups: + - age: + - *laptop + - path_regex: nathan/secrets.yaml$ + key_groups: + - age: + - *laptop + - *homebox + - *android + - path_regex: system-config/secrets.yaml$ + key_groups: + - age: + - *laptop + - *homebox + - *android diff --git a/system-config/configuration/android/default.nix b/machines/android/configuration.nix similarity index 97% rename from system-config/configuration/android/default.nix rename to machines/android/configuration.nix index 5f81ec5..c342987 100644 --- a/system-config/configuration/android/default.nix +++ b/machines/android/configuration.nix @@ -19,7 +19,7 @@ ]; config = { config, lib, pkgs, ... }: { imports = [ - inputs.nathan + inputs.olympus.homes.nathan ]; config = { homeconfig = { diff --git a/machines/android/flake.nix b/machines/android/flake.nix new file mode 100644 index 0000000..27ad2f1 --- /dev/null +++ b/machines/android/flake.nix @@ -0,0 +1,47 @@ +{ + + description = "System Configuration"; + + inputs = { + + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; + + home-manager = { + url = "github:nix-community/home-manager/release-25.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + nix-on-droid = { + url = "github:nix-community/nix-on-droid"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; + + olympus = { + url = "git+ssh://gitea@esotericbytes.com/Blunkall-Technologies/Olympus"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; + }; + + outputs = { self, nixpkgs, olympus, ... } @ inputs: let + host = "laptop"; + + in { + + nixOnDroidConfigurations.default = inputs.nix-on-droid.lib.nixOnDroidConfiguration { + pkgs = import nixpkgs { + system = "aarch64-linux"; + overlays = [ inputs.nix-on-droid.overlays.default ]; + }; + + modules = [ + ./configuration.nix + ]; + + extraSpecialArgs = { + inherit inputs; + }; + }; + }; +} diff --git a/machines/laptop/.sops.yaml b/machines/laptop/.sops.yaml new file mode 100644 index 0000000..0a2ab72 --- /dev/null +++ b/machines/laptop/.sops.yaml @@ -0,0 +1,33 @@ +keys: + - &homebox age1640eg0pnmkruc89m5xguz0m8fek44fl4tzez6qwuzlz6kmapqewsp8esxd + - &laptop age1yqgyp2uxz4lzrc9f9ka0mfjl5fr6ahf8nf24nlmran2wulg6fpvq9hyp9q + - &android age12pnf36uqesjmy3e0lythfnpwam3zg5mv8m936fc4jphy4ces2fdqwn0s74 +creation_rules: + - path_regex: homebox/secrets.yaml$ + key_groups: + - age: + - *homebox + - path_regex: laptop/secrets.yaml$ + key_groups: + - age: + - *laptop + - path_regex: pi4/secrets.yaml$ + key_groups: + - age: + - *laptop + - path_regex: live/secrets.yaml$ + key_groups: + - age: + - *laptop + - path_regex: nathan/secrets.yaml$ + key_groups: + - age: + - *laptop + - *homebox + - *android + - path_regex: system-config/secrets.yaml$ + key_groups: + - age: + - *laptop + - *homebox + - *android diff --git a/machines/laptop/configuration.nix b/machines/laptop/configuration.nix new file mode 100644 index 0000000..5b8d3aa --- /dev/null +++ b/machines/laptop/configuration.nix @@ -0,0 +1,99 @@ +# 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, ... }: + +{ + + imports = [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + config = { + + boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ]; + + hardware.nvidia = { + modesetting.enable = true; + powerManagement.enable = true; + powerManagement.finegrained = true; + open = false; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + + prime = { +# Make sure to use the correct Bus ID values for your system! + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; +# WARNING: sync and offload are mutually exclusive. +# You can only pick one!! +#sync.enable = true; + offload = { + enable = true; + enableOffloadCmd = true; + }; + }; + }; + + sops = { + defaultSopsFile = ./secrets.yaml; + secrets = { + "nathan/pass" = { + neededForUsers = true; + }; + }; + }; + + sysconfig = { + users = { + nathan = { + isSuperuser = true; + extraGroups = [ "networkmanager" ]; + hashedPasswordFile = config.sops.secrets."nathan/pass".path; + shell = pkgs.zsh; + home-manager = { + enable = true; + standalone = false; + extraModules = [ + { + homeconfig = { + minimal = false; + hyprland.enable = true; + hyprlock.enable = true; + wal.enable = true; + mpd.enable = true; + hyprpanel.enable = true; + calcurse.enable = true; + rofi.enable = true; + firefox.enable = true; + git.enable = true; + nh.enable = true; + }; + + #monitor=eDP-1, addreserved, 40,0,0,0 + wayland.windowManager.hyprland.extraConfig = '' + monitor=eDP-1,1920x1080@60,0x0,1 + ''; + + } + ]; + }; + }; + }; + }; + + + services.xserver.videoDrivers = [ "nvidia" ]; + + +# 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 = "23.05"; # Did you read the comment? + }; + +} diff --git a/machines/laptop/flake.nix b/machines/laptop/flake.nix new file mode 100644 index 0000000..9842c88 --- /dev/null +++ b/machines/laptop/flake.nix @@ -0,0 +1,38 @@ +{ + + description = "System Configuration"; + + inputs = { + + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; + + home-manager = { + url = "github:nix-community/home-manager/release-25.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + olympus = { + url = "git+ssh://gitea@esotericbytes.com/Blunkall-Technologies/Olympus"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; + }; + + outputs = { self, nixpkgs, olympus, ... }: let + host = "laptop"; + + in { + + nixosConfigurations."${host}" = nixpkgs.lib.nixosSystem { + + specialArgs = { + }; + + modules = [ + { sysconfig.host = host; } + ./configuration.nix + olympus.laptop + ]; + }; + }; +} diff --git a/system-config/configuration/laptop/hardware-configuration.nix b/machines/laptop/hardware-configuration.nix similarity index 100% rename from system-config/configuration/laptop/hardware-configuration.nix rename to machines/laptop/hardware-configuration.nix diff --git a/system-config/configuration/laptop/secrets.yaml b/machines/laptop/secrets.yaml similarity index 100% rename from system-config/configuration/laptop/secrets.yaml rename to machines/laptop/secrets.yaml diff --git a/system-config/configuration/containers/default.nix b/system-config/configuration/containers/default.nix deleted file mode 100644 index 75b6ff9..0000000 --- a/system-config/configuration/containers/default.nix +++ /dev/null @@ -1 +0,0 @@ -{ ... }: { config = {}; } diff --git a/system-config/configuration/containers/nathan/secrets.yaml b/system-config/configuration/containers/nathan/secrets.yaml deleted file mode 100644 index 8ef55cc..0000000 --- a/system-config/configuration/containers/nathan/secrets.yaml +++ /dev/null @@ -1,41 +0,0 @@ -nathan: - pass: ENC[AES256_GCM,data:hAqmFg==,iv:iw85yox2jdlpvF+a4c0wsXlN6rFd75Yf32nuove91hA=,tag:eoFowxaNogmwElnBs5vYGA==,type:str] -authentik: - pass: ENC[AES256_GCM,data:pTjpwRgdUVU5543T199P7Zoy,iv:93WpIK6qq+A1LhaQdBvMQ4jzuAOmMUt575y/p8m8Ugk=,tag:jTg/JED3vpdOVHF8LdIyLg==,type:str] - secret_key: ENC[AES256_GCM,data:tIWDGtB/z7Ysizz9FPQJe2EeSTAxDPkeHJnaDfytDvbqvRaiCgg7qGpEF6hAQFdZ,iv:gloup5aI0qY+SYJt8V6lvUdE+18IWH09BXtz8dRi6JE=,tag:vFwF9h1Rsa/X1bjvdSRSfQ==,type:str] -pihole: - pass: ENC[AES256_GCM,data:hintZA==,iv:HA5K8mHYlLtf5s8iaLI/QRolYgcKwG8DWCH+LXnWI4k=,tag:DlnXxG0n9dBVpk2kILlPKg==,type:str] -gitea: - dbpass: ENC[AES256_GCM,data:hVRLXACRECNSnXRn8BEP0ZFT,iv:zuIvzStek6OEu+P4Nh8Wsq9eRVt/zP8KGVXYZWjSvW0=,tag:m4t8vKNGhz8NqkDWbCRgnA==,type:str] -keycloak: - dbpass: ENC[AES256_GCM,data:tc4wIAqzY7nonBhz8s+YdAux,iv:Wg0b0/xnl6cANLTOJWBsX+gw1iF8Q/GvO/iKyKwqJrM=,tag:LORKRmo4RjcrVbPNhk2A9Q==,type:str] -netbird: - coturnPass: ENC[AES256_GCM,data:zB6P9RyTTKkXEOIhOyeJuF4Y,iv:8SWVfcdmMnXQJxezu3uanrlmFhR+hxXEJ3T7KA+YZqE=,tag:1H21K3kbZOuLOdN2zufWJw==,type:str] -gitlab: - db_pass: ENC[AES256_GCM,data:N3KvXkXql/PDjxZSpGo/Apr/,iv:OOzhR4BEmV3T01PA50vqdJMg7D2OGKHn/8hiqKEaOd4=,tag:jzdonXH/D/5kZ5Cld2W//w==,type:str] - root_pass: ENC[AES256_GCM,data:bALaUkoJw3N0ugZP/4MCnEsD,iv:LJdJpXlyzA6o00UVlK+l5WCCFIL/sT/fQNjI8wA5LAg=,tag:BYk1o/rjubyEpeHbgYA1Sg==,type:str] - secrets: - secret: ENC[AES256_GCM,data:3/26giCD58RErtEDxQ90KxRl3aa8oH4co2Urw21r7hHCKaoSti1VpYoBtlvHdr5j,iv:SwliwLWSFfTZoc31JSm9YKBDGKiPQE7ujkiGaZmCQUc=,tag:2KT5BpJukixvhb6tnZb6lw==,type:str] - otp: ENC[AES256_GCM,data:RWOkQVPRsrJgPVtx49hiWRMAxVOszKxaDl40XQDL+QoDuoZi03wSxHiu4Ix9X2BR,iv:uO+CTR5S4r1q7n1ycQw0hYdu8JflSrvkgLiBbCmT8mk=,tag:gqCwNOqD78lFtgxUPyUw3A==,type:str] - db: ENC[AES256_GCM,data:rF4IIp1uFSGa67LVm8fy4/qFOmZLInRcG2IAfnuZG3+xtS9Z2RXpNcTZNFBDdOaD,iv:/KYwf3ZH6w48L49rY/FmaGQOt3jGdOUTZ9vFhmLZG60=,tag:f38iYIgpgdjWF34qD1fz2w==,type:str] - jws: ENC[AES256_GCM,data:C+GVDeO319QGjq2+fBMr1LaY6/6Tuz6jWomkvFVul6ydJjmMFO3A9dYI66WWY6g2iZgYEWDKUikW1qDK5sGgU5ZAZzaqS01LUsSsPHUcMqIg/AjtcRfaEvHYODYPPSEwdISzhceDaim8yqhrNTIOHUHvOxcILvtUmsI61hNfVSnOQbqifIJDgGP7bKaf96t8+qcBvp/UBwP1qHj/m4jD83yc8Pdih+ZuPmyNdo3Ew0nbLTykYVX3XsrO1RlJ/Gp+KPfRSJzVGAnqUKr8mI+32LUpXSJ96bEGA67/blSh1dbBxSVo3K83aZYuY6vvXb+Et6qd4piZYKGCxA+waSrTkYHvSgS5vJRbCGWauXKCYFASxxqmdJ3cu+rbphbshBVA3SIPHhZxun6BWaP0qTYZyfB/YsSU4J+kYiE3UEYX9GYEAY9bsO89IYZSsTsmYke2EI4KMcjyUFstZ2WTYqCpwJ6CMAuerDEMHP6N3xCO5MVDZfE4sKKHpfSCVQg8ak7IxV+3jZvZi2tUbvZZf/tYORzPeTUSEpcC4cGwwAJd3XKUetaiuDwQVkLa13xotfL0d+Lwc6eZil0e/sureLqvQM6kpWhK7yscu2hKGOzxx/OZClry2Uyc1fL5iWWxvM8Djg+ShoAS5m3Nt0R+mcLdgaylkZvMl9gNWFO1uzlnhGnJQtekVaXCJ9f9QZt5RizJYwM9pMKhSDTZ0vd4y69iZpz3YXhKtkvYX02RIFtTiqsbyU0pXVjK0SpKsb5T+yphacGeZRwQS9QadW9dE6xQsxwwYC//swm5l6ke+DyZrcsc/J+MBHFuN71D2st+jtfywZYg/YT9EcCFOMjqEgfDq7YICgyqfqRGAdVWQy660T5Mi+gYKcHqbYXaaB3VNL2RGIu/uybih/7ynGRM2+0ro9oKJ+fEbdi1alSFFJ0IvA5lU6XHd2CSyizEC9ak+HBLkYeSqOPfItfLH82jRiUtrY5u4fIlioLQTA1aKHax6q8cIf30FCGenhjM6jMj2WpXKI16+1xK9Om9mg94YmFjM+erQh3o/fbPuMbkNaNJQwabupshBK2h3caaE0cDUnDukUFUANHz9q5LVxSkw39GTjGpovxQJiZHbSdeIC/AzFXRVA1ojhzkeuefygdP27Aa+fLjEBn2x8AcdhyP1n8lQyjy0Wnxq9hJDbVXJF93FIdcCmF/JGejgHcr3YZUMY4OFG9gzISDEdgR99fYvKM+A9Pj2JNtCQ5iKCctg5opIEKA1z4RIpRQs0KmXq3JgjWhU1LeOWaX2YzS5rCJWyhxnTJXGk4a/cMvhbLRjFOKcDNNMp8yJrXk1pth7nFOJ4Put6o67jtjbgpgnPuEdelnXEEaReCfJEo2z8zka63kYqbIvcG4W2pKwsA4tT0QctVwltRdYU8YyKuOpQJtKvVdlZL0oxOwxPioTT8fOebRBaecKhQKF4fp9UGlE/GStud6oFSbN685U2TKihvYNmfLRSWQk1Y/APyCRlhOmhFLaIzJxogdlKzpg4AEg/2SRoEZPsqyZThI8uhCIT1qG0UBiZBTjey322fsEEZtNxO5nX/JeBDOVty3sIGs1OKBTjMXSZ+nzU9AIH6dek9Bz+Fix7a90IkQUB5xtgrIYgCH34L4a0o1jWy5bzT9fl53VnbzrICcT/wdRU/GznYYjxlF2uRBKIu7s0glDmsPXCZuorqvJlr2hySgN/hJKOlrCghraUD14pRk4OfRVKULkPQ7betgaCVbsihXplodrAgJ0BdIbf3tKRC8Ghx8+mYAWNXj+PtWBydEjEirCH70SJu53gjF5mNgl2EIaHNK7jqBgXhDr2/7uH97Tl+S9ue+TDlpr067T5JAqU3fOqq+ZS4wqEvqMYRfXd/V2FjNbBpoH8UW6pMuFaM06DBI+6p9O9xBl1eP3Sy3vrBwK2pCwLbi0LdJ2apQTl/51ZXp2xaaUAAh1Fu/bM21V7ENa5sGxpSTYwdSLyPnd8usqECw9W1XDNUI2EmJnp9AelD/joNwuL6U7pydrNUCguCjxHfbd+m0vc/te53GerJlSXbjEWz53f3RjSB90AaA6sOGhi1BFiHYSAjzMdqVSj4M68r+UF3YIuEuoaOzrVrkb5st3tYD0dz+ORhxo44aKEzgohseha5fg0wcTz9orqkeP/FyoOeItG2UwNVAWWGh/lBtXh8c4ILUMolZ1m2DWiYj/pyDvODVnP96u6TvyMC0H8aolgGHn7nDMTi+mCIvNFQYeXdVrRCpWS9aQik=,iv:cxdargXx2a7pET7BjCSZ/yXL7AnxNqncyDQ7CR3E3AA=,tag:2xKXfhBjynDqlvH377lpSA==,type:str] - oidc: - id: ENC[AES256_GCM,data:b6o2cCCSXJ5bIhA47InfhqwjO5Tjr0Mls+7VT5cunFfEHkdOInxplw==,iv:txren/8jnAUvCI/k9cxN29ZkSgCuPEAo0IpyREf2E9A=,tag:BFOZrM18zUJMEACpLz7KRw==,type:str] - secret: ENC[AES256_GCM,data:4HPPbVBOeDjdL81d402Rz6Luk1DZbk8InHfO+Sx/OJIvUf/shkCRyp3hStIDC03bA8HV66GeejvWFte+vQ2b5X3Fl2GXfHQi7brMFVEYfYdR2XRdra0aOeSrHtW5uUn0MpVCRwYDb1JahIWhLyqcYyOpV91xjNiIVg8S3MHr+mo=,iv:c3Q4qPMxZJuoO5XRzUDZh5XJOtff9eiMTlOx+MDMSaE=,tag:07fIkN9YXXJMEV59QEFIag==,type:str] -nextcloud: - pass: ENC[AES256_GCM,data:U/VI/uHDT1a5O4iAHUVwsz/h,iv:W0hAXBddFKhXmDWHpCB2JhjPPTEGer7721WtIRxg4Zo=,tag:OE4wzibNaaXsbfFuk0dwTA==,type:str] -sops: - age: - - recipient: age1640eg0pnmkruc89m5xguz0m8fek44fl4tzez6qwuzlz6kmapqewsp8esxd - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBDVFhtcWkreVV6UmJkcW1P - WUluUTlOcjYzME1yVVNpVWJldXVsWG1vN3dNCmlvYURNV285anlIa3FrbXRVTERB - dXZDWHhEbFp3YWw5d2w4Y09vbUVCNHcKLS0tIEF4ZU5ZdWI5MVBtN0FOUUZDQUR4 - S0NMRGJSeks0Q0UrVnZmUVdyU2NqVm8KLu2kQpD1fJdU0fTdR9A2cTQzRp+waJ6M - 8vA+E8xYb2U4d7m0YnwKkGzw0CBPb0BvdEgvWvqpFViftoDwRv5KGA== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-07-29T21:54:33Z" - mac: ENC[AES256_GCM,data:FdEOqSuTYZzl2T9QOJ3G+MlgZIvlLi3YhL9aOP3bws1N6MLfQcSgkQbhS4Nz4dQBpebOQ2OdT0QinFgXC7QyveiFefh1K1IxVAyRkwMd1xeCwbf2J/ERunCdJ7QsNh6pGJtTcv0h/gvviEVQ2S4FTmpFOjrLSUJI7kz92FI3vd4=,iv:1lOKQzHtG0kYcFLtn522uYrXE96Vq1a6qTj3/SkLSyI=,tag:69spH8TETUv3KYzH9eQcMA==,type:str] - unencrypted_suffix: _unencrypted - version: 3.10.2 diff --git a/system-config/configuration/laptop/default.nix b/system-config/configuration/laptop/default.nix deleted file mode 100644 index a0bb8b5..0000000 --- a/system-config/configuration/laptop/default.nix +++ /dev/null @@ -1,192 +0,0 @@ -{ config, pkgs, lib, inputs, ... }: - -{ - - imports = [ - ./hardware-configuration.nix - - inputs.home-manager.nixosModules.default - - inputs.sops-nix.nixosModules.sops - ]; - - config = { - - nixpkgs.config = { - allowUnfree = true; - }; - -# Bootloader. - boot = { - kernelPackages = pkgs.linuxKernel.packages.linux_6_16; - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - timeout = null; - }; - kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ]; - }; - - systemd.extraConfig = "DefaultLimitNOFILE=2048"; - - /*specialisation = { - docked.configuration = { - home-manager.users.nathan.wayland.windowManager.hyprland.extraConfig = '' - monitor=eDP-1,1920x1080@300,0x0,1 - ''; - }; - };*/ - - home-manager.users.nathan.wayland.windowManager.hyprland.extraConfig = /*lib.mkIf (config.specialisation != {})*/ '' - monitor=eDP-1,1920x1080@60,0x0,1 - ''; -#monitor=eDP-1, addreserved, 40,0,0,0 - - hardware = { - graphics.enable = true; - - firmware = with pkgs; [ - sof-firmware - ]; - - nvidia = { - modesetting.enable = true; - powerManagement.enable = true; - powerManagement.finegrained = true; - open = false; - nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.stable; - - prime = { -# Make sure to use the correct Bus ID values for your system! - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:1:0:0"; -# WARNING: sync and offload are mutually exclusive. -# You can only pick one!! -#sync.enable = true; - offload = { - enable = true; - enableOffloadCmd = true; - }; - }; - }; -#enable bluetooth - bluetooth.enable = true; - - }; - - services.pulseaudio.enable = false; - - environment.systemPackages = with pkgs; [ - alsa-utils - ]; - - sysconfig = { - remoteBuildClient = true; - host = "laptop"; - graphical = true; - users = { - nathan = { - extraGroups = [ "wheel" "networkmanager" ]; - hashedPasswordFile = config.sops.secrets."nathan/pass".path; - shell = pkgs.zsh; - home-manager = { - enable = true; - standalone = false; - extraModules = [ - { - homeconfig = { - minimal = false; - hyprland.enable = true; - hyprlock.enable = true; - wal.enable = true; - mpd.enable = true; - hyprpanel.enable = true; - calcurse.enable = true; - rofi.enable = true; - firefox.enable = true; - git.enable = true; - nh.enable = true; - }; - } - ]; - }; - }; - }; - - services = { - sddm.enable = true; - openssh.enable = false; - pipewire.enable = true; - netbird.enable = true; - ollama.enable = true; - }; - - programs = { - steam.enable = true; - hyprpanel.enable = true; - hyprland.enable = true; - }; - - - virtualization = { - - wyoming = { - enable = false; - }; - - homeassistant = { - enable = false; - }; - }; - }; - - -# Enable the X11 windowing system. - services.xserver = { - enable = true; - videoDrivers = ["nvidia"]; - }; - - services.displayManager.enable = true; - - services.avahi = { - - enable = true; - ipv4 = true; - ipv6 = true; - openFirewall = true; - nssmdns4 = true; - wideArea = true; - - }; - - - environment.shells = with pkgs; [ zsh bashInteractive ]; - -# Enable CUPS to print documents. - services.printing.enable = true; - - programs.adb.enable = true; - - programs.zsh.enable = true; - - system.stateVersion = "23.05"; # Did you read the comment? - - networking = { - nameservers = [ "1.1.1.1" "1.0.0.1" ]; - networkmanager.enable = true; - }; - - sops = { - age.keyFile = "/var/lib/sops/age/keys.txt"; - defaultSopsFile = ./secrets.yaml; - defaultSopsFormat = "yaml"; - secrets."nathan/pass".neededForUsers = true; - }; - - fonts.packages = with pkgs; [ nerd-fonts.fira-code ]; - - }; - -} diff --git a/system-config/default.nix b/system/default.nix similarity index 95% rename from system-config/default.nix rename to system/default.nix index 6fdb3de..d780277 100644 --- a/system-config/default.nix +++ b/system/default.nix @@ -105,10 +105,15 @@ }; programs.ssh.extraConfig = '' - Host blunkall.us - HostName blunkall.us + Host esotericbytes.com + HostName esotericbytes.com Port 2222 ''; + + sops = { + age.keyFile = "/var/lib/sops/age/keys.txt"; + defaultSopsFormat = "yaml"; + }; time.timeZone = lib.mkDefault "America/Chicago"; diff --git a/system-config/etc/default.nix b/system/etc/default.nix similarity index 100% rename from system-config/etc/default.nix rename to system/etc/default.nix diff --git a/system-config/packages/default.nix b/system/packages/default.nix similarity index 100% rename from system-config/packages/default.nix rename to system/packages/default.nix diff --git a/system-config/configuration/containers/nathan/default.nix b/system/profiles/container/default.nix similarity index 100% rename from system-config/configuration/containers/nathan/default.nix rename to system/profiles/container/default.nix diff --git a/system-config/configuration/homebox/default.nix b/system/profiles/homebox/default.nix similarity index 100% rename from system-config/configuration/homebox/default.nix rename to system/profiles/homebox/default.nix diff --git a/system-config/configuration/homebox/disko.nix b/system/profiles/homebox/disko.nix similarity index 100% rename from system-config/configuration/homebox/disko.nix rename to system/profiles/homebox/disko.nix diff --git a/system-config/configuration/homebox/hardware-configuration.nix b/system/profiles/homebox/hardware-configuration.nix similarity index 100% rename from system-config/configuration/homebox/hardware-configuration.nix rename to system/profiles/homebox/hardware-configuration.nix diff --git a/system-config/configuration/homebox/secrets.yaml b/system/profiles/homebox/secrets.yaml similarity index 100% rename from system-config/configuration/homebox/secrets.yaml rename to system/profiles/homebox/secrets.yaml diff --git a/system-config/configuration/iso/default.nix b/system/profiles/iso/default.nix similarity index 100% rename from system-config/configuration/iso/default.nix rename to system/profiles/iso/default.nix diff --git a/system-config/configuration/jesstop/default.nix b/system/profiles/jesstop/default.nix similarity index 100% rename from system-config/configuration/jesstop/default.nix rename to system/profiles/jesstop/default.nix diff --git a/system-config/configuration/jesstop/hardware-configuration.nix b/system/profiles/jesstop/hardware-configuration.nix similarity index 100% rename from system-config/configuration/jesstop/hardware-configuration.nix rename to system/profiles/jesstop/hardware-configuration.nix diff --git a/system/profiles/laptop/default.nix b/system/profiles/laptop/default.nix new file mode 100644 index 0000000..7a3eb39 --- /dev/null +++ b/system/profiles/laptop/default.nix @@ -0,0 +1,117 @@ +{ config, pkgs, lib, inputs, ... }: + +{ + + imports = [ + inputs.home-manager.nixosModules.default + + inputs.sops-nix.nixosModules.sops + ]; + + config = { + + nixpkgs.config = { + allowUnfree = true; + }; + +# Bootloader. + boot = { + kernelPackages = pkgs.linuxKernel.packages.linux_6_16; + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + timeout = null; + }; + }; + + systemd.extraConfig = "DefaultLimitNOFILE=2048"; + + hardware = { + graphics.enable = true; + + firmware = with pkgs; [ + sof-firmware + ]; + +#enable bluetooth + bluetooth.enable = true; + + }; + + services.pulseaudio.enable = false; + + environment.systemPackages = with pkgs; [ + alsa-utils + ]; + + sysconfig = with lib; { + remoteBuildClient = mkDefault true; + graphical = mkDefault true; + + services = { + sddm.enable = mkDefault true; + openssh.enable = mkDefault false; + pipewire.enable = mkDefault true; + netbird.enable = mkDefault true; + ollama.enable = mkDefault true; + }; + + programs = { + steam.enable = mkDefault true; + hyprpanel.enable = mkDefault true; + hyprland.enable = mkDefault true; + }; + + + virtualization = { + + wyoming = { + enable = mkDefault false; + }; + + homeassistant = { + enable = mkDefault false; + }; + }; + }; + + +# Enable the X11 windowing system. + services.xserver = { + enable = true; + }; + + services.displayManager.enable = true; + + services.avahi = { + + enable = true; + ipv4 = true; + ipv6 = true; + openFirewall = true; + nssmdns4 = true; + wideArea = true; + + }; + + + environment.shells = with pkgs; [ zsh bashInteractive ]; + +# Enable CUPS to print documents. + services.printing.enable = true; + + programs.adb.enable = true; + + programs.zsh.enable = true; + + networking = { + nameservers = [ "1.1.1.1" "1.0.0.1" ]; + networkmanager.enable = true; + }; + + + fonts.packages = with pkgs; [ nerd-fonts.fira-code ]; + + }; + +} diff --git a/system/profiles/laptop/secrets.yaml b/system/profiles/laptop/secrets.yaml new file mode 100644 index 0000000..fa2e25d --- /dev/null +++ b/system/profiles/laptop/secrets.yaml @@ -0,0 +1,18 @@ +nathan: + pass: ENC[AES256_GCM,data:H/duNPyclGoCF/Z90TQcqaUymowHOLRDmcfDxSubNGdmijknsCq+UH5PaWUmXGZ7uZqcpYWBcsVbYfQO/98OHH/kbwAFD/Hgkw==,iv:74M2PQqVzAgMXA8Z4RVLJKawt0Lzh94IKbn8YCTx3tY=,tag:B/xgA4mrhWEccaXQ+qvjCA==,type:str] +remoteBuildKey: ENC[AES256_GCM,data:CN7AyOCV4iYzYrwVh2Af5YB0nwR4raXfj5FbbeIZg5Bfha0sUPnLAG+oqVUyzVQA3yftFhfwPGaALOyb6VlT13pTifG+uEoyiq1dQP6dimlmk/p/6kVtg4aiETJ/61EUeQF/HTVTZ3F7akgQRsKNFQYbF2srcurPQSY0Q2gjlkkFA3A3aLoN2LrkFPJvtnNP6SJzXDFHVOTPmbc/DvF9UbMiYu0viIlfiPqeBs26lAqcOWhrYlOxKqEL2IoP3kADDncedxT42c1rCPB/2kGvKg+mXSlaIH3a0Hb8hrnjVUB0edyqYnNCurVhPF8mg2yoqrtyaxRkZKvUsa5LBZwS+iL9bYQdU/4hxT9c7wRC+ZtWkwF4l/gy8Ggc+VuB+YT9JUCJY96o8f2wKFup0BS+oiYLGJKpcOLMFrPJLEtOMrqPN/Z6+gZ9LVbhlSliIV/yUTJAa26el0w6tP9Ebs6tHiFakpkMahsBbRxmHBmqkHW5zfa5YpvD5Ii/EC+F8Vb/Efn6LkBZBwSB6K33NSOy,iv:4i0bGQe7wiDSvmygY2VNSEhuYfYIi9YY1g7qLgDTcMo=,tag:MJqOovOcZ97COsVjxZus8w==,type:str] +sops: + age: + - recipient: age1yqgyp2uxz4lzrc9f9ka0mfjl5fr6ahf8nf24nlmran2wulg6fpvq9hyp9q + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB2MEIyRjR0a25UU3hnR2Zw + WXFaaXJYNWFSMmZsR1FsYVB1WlBkZWptSHhzCkRGRitnNkc3MEtjV05KRXlXT3RR + TVhnVlpUdzFiSEwxbHNOT3dyQ0dzbG8KLS0tIElMc3g4SHRxZTVnOCtVcktRb25D + Y2ZpR25VNGVoMi9ibW8wbW5rYTQ3R00Ka6/KLXSSRP9WJDV0RBHHS5nALfd/3xDu + y+QS+Ueh56kQT2zbYpYBRIPDgI3LZgwlTifQCDJ9ZPq0LGgu4XbEqQ== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2025-08-23T03:46:50Z" + mac: ENC[AES256_GCM,data:QJLMqnmkrgtTqqmLN9NCfV8PPm5N/F0gtGw/XlX+nnfbesGVeYubSjtHmYWmY7ha41jEvLYu8rmIXaxDepfogyOf4wzuRPLkJxO7Wu0UVdr5uZlHNrcxZh4Ex6YGgg8Lbcjs0iVCev66lWfuhuxuvPOKsGLZvoNTq0V1hLpo/Fw=,iv:VFrL0L6tC1JvWM3BOJP4Dh+q1xSMBecCtPnNcY/loAU=,tag:p5VmBaGPTxyTmm1Ha9Le3Q==,type:str] + unencrypted_suffix: _unencrypted + version: 3.10.2 diff --git a/system-config/configuration/live/default.nix b/system/profiles/live/default.nix similarity index 100% rename from system-config/configuration/live/default.nix rename to system/profiles/live/default.nix diff --git a/system-config/configuration/live/disko.nix b/system/profiles/live/disko.nix similarity index 100% rename from system-config/configuration/live/disko.nix rename to system/profiles/live/disko.nix diff --git a/system-config/configuration/live/secrets.yaml b/system/profiles/live/secrets.yaml similarity index 100% rename from system-config/configuration/live/secrets.yaml rename to system/profiles/live/secrets.yaml diff --git a/system-config/configuration/pi4/default.nix b/system/profiles/pi4/default.nix similarity index 100% rename from system-config/configuration/pi4/default.nix rename to system/profiles/pi4/default.nix diff --git a/system-config/configuration/pi4/disko.nix b/system/profiles/pi4/disko.nix similarity index 100% rename from system-config/configuration/pi4/disko.nix rename to system/profiles/pi4/disko.nix diff --git a/system-config/configuration/pi4/hardware-configuration.nix b/system/profiles/pi4/hardware-configuration.nix similarity index 100% rename from system-config/configuration/pi4/hardware-configuration.nix rename to system/profiles/pi4/hardware-configuration.nix diff --git a/system-config/configuration/pi4/secrets.yaml b/system/profiles/pi4/secrets.yaml similarity index 100% rename from system-config/configuration/pi4/secrets.yaml rename to system/profiles/pi4/secrets.yaml diff --git a/system-config/programs/default.nix b/system/programs/default.nix similarity index 100% rename from system-config/programs/default.nix rename to system/programs/default.nix diff --git a/system-config/programs/hyprland/default.nix b/system/programs/hyprland/default.nix similarity index 100% rename from system-config/programs/hyprland/default.nix rename to system/programs/hyprland/default.nix diff --git a/system-config/programs/hyprpanel/default.nix b/system/programs/hyprpanel/default.nix similarity index 100% rename from system-config/programs/hyprpanel/default.nix rename to system/programs/hyprpanel/default.nix diff --git a/system-config/programs/steam/default.nix b/system/programs/steam/default.nix similarity index 100% rename from system-config/programs/steam/default.nix rename to system/programs/steam/default.nix diff --git a/system-config/secrets.yaml b/system/secrets.yaml similarity index 100% rename from system-config/secrets.yaml rename to system/secrets.yaml diff --git a/system-config/services/containers/authentik/default.nix b/system/services/containers/authentik/default.nix similarity index 100% rename from system-config/services/containers/authentik/default.nix rename to system/services/containers/authentik/default.nix diff --git a/system-config/services/containers/code-server/default.nix b/system/services/containers/code-server/default.nix similarity index 100% rename from system-config/services/containers/code-server/default.nix rename to system/services/containers/code-server/default.nix diff --git a/system-config/services/containers/default.nix b/system/services/containers/default.nix similarity index 100% rename from system-config/services/containers/default.nix rename to system/services/containers/default.nix diff --git a/system-config/services/containers/gitea/default.nix b/system/services/containers/gitea/default.nix similarity index 100% rename from system-config/services/containers/gitea/default.nix rename to system/services/containers/gitea/default.nix diff --git a/system-config/services/containers/gitlab/default.nix b/system/services/containers/gitlab/default.nix similarity index 100% rename from system-config/services/containers/gitlab/default.nix rename to system/services/containers/gitlab/default.nix diff --git a/system-config/services/containers/homeassistant/default.nix b/system/services/containers/homeassistant/default.nix similarity index 100% rename from system-config/services/containers/homeassistant/default.nix rename to system/services/containers/homeassistant/default.nix diff --git a/system-config/services/containers/jellyfin/default.nix b/system/services/containers/jellyfin/default.nix similarity index 100% rename from system-config/services/containers/jellyfin/default.nix rename to system/services/containers/jellyfin/default.nix diff --git a/system-config/services/containers/keycloak/default.nix b/system/services/containers/keycloak/default.nix similarity index 100% rename from system-config/services/containers/keycloak/default.nix rename to system/services/containers/keycloak/default.nix diff --git a/system-config/services/containers/minecraft/default.nix b/system/services/containers/minecraft/default.nix similarity index 100% rename from system-config/services/containers/minecraft/default.nix rename to system/services/containers/minecraft/default.nix diff --git a/system-config/services/containers/n8n/default.nix b/system/services/containers/n8n/default.nix similarity index 100% rename from system-config/services/containers/n8n/default.nix rename to system/services/containers/n8n/default.nix diff --git a/system-config/services/containers/netbird/default.nix b/system/services/containers/netbird/default.nix similarity index 100% rename from system-config/services/containers/netbird/default.nix rename to system/services/containers/netbird/default.nix diff --git a/system-config/services/containers/nextcloud/default.nix b/system/services/containers/nextcloud/default.nix similarity index 100% rename from system-config/services/containers/nextcloud/default.nix rename to system/services/containers/nextcloud/default.nix diff --git a/system-config/services/containers/nginx/default.nix b/system/services/containers/nginx/default.nix similarity index 100% rename from system-config/services/containers/nginx/default.nix rename to system/services/containers/nginx/default.nix diff --git a/system-config/services/containers/novnc/default.nix b/system/services/containers/novnc/default.nix similarity index 100% rename from system-config/services/containers/novnc/default.nix rename to system/services/containers/novnc/default.nix diff --git a/system-config/services/containers/ntfy/default.nix b/system/services/containers/ntfy/default.nix similarity index 100% rename from system-config/services/containers/ntfy/default.nix rename to system/services/containers/ntfy/default.nix diff --git a/system-config/services/containers/ollama/default.nix b/system/services/containers/ollama/default.nix similarity index 100% rename from system-config/services/containers/ollama/default.nix rename to system/services/containers/ollama/default.nix diff --git a/system-config/services/containers/openwebui/default.nix b/system/services/containers/openwebui/default.nix similarity index 100% rename from system-config/services/containers/openwebui/default.nix rename to system/services/containers/openwebui/default.nix diff --git a/system-config/services/containers/pihole/default.nix b/system/services/containers/pihole/default.nix similarity index 100% rename from system-config/services/containers/pihole/default.nix rename to system/services/containers/pihole/default.nix diff --git a/system-config/services/containers/rustdesk/default.nix b/system/services/containers/rustdesk/default.nix similarity index 100% rename from system-config/services/containers/rustdesk/default.nix rename to system/services/containers/rustdesk/default.nix diff --git a/system-config/services/containers/sandbox/default.nix b/system/services/containers/sandbox/default.nix similarity index 100% rename from system-config/services/containers/sandbox/default.nix rename to system/services/containers/sandbox/default.nix diff --git a/system-config/services/containers/traefik/default.nix b/system/services/containers/traefik/default.nix similarity index 100% rename from system-config/services/containers/traefik/default.nix rename to system/services/containers/traefik/default.nix diff --git a/system-config/services/containers/wyoming/default.nix b/system/services/containers/wyoming/default.nix similarity index 100% rename from system-config/services/containers/wyoming/default.nix rename to system/services/containers/wyoming/default.nix diff --git a/system-config/services/default.nix b/system/services/default.nix similarity index 100% rename from system-config/services/default.nix rename to system/services/default.nix diff --git a/system-config/services/dynamicDNS/default.nix b/system/services/dynamicDNS/default.nix similarity index 100% rename from system-config/services/dynamicDNS/default.nix rename to system/services/dynamicDNS/default.nix diff --git a/system-config/services/kdePlasma6/default.nix b/system/services/kdePlasma6/default.nix similarity index 100% rename from system-config/services/kdePlasma6/default.nix rename to system/services/kdePlasma6/default.nix diff --git a/system-config/services/minecraft/default.nix b/system/services/minecraft/default.nix similarity index 100% rename from system-config/services/minecraft/default.nix rename to system/services/minecraft/default.nix diff --git a/system-config/services/novnc/default.nix b/system/services/novnc/default.nix similarity index 100% rename from system-config/services/novnc/default.nix rename to system/services/novnc/default.nix diff --git a/system-config/services/ollama/default.nix b/system/services/ollama/default.nix similarity index 100% rename from system-config/services/ollama/default.nix rename to system/services/ollama/default.nix diff --git a/system-config/services/openssh/default.nix b/system/services/openssh/default.nix similarity index 100% rename from system-config/services/openssh/default.nix rename to system/services/openssh/default.nix diff --git a/system-config/services/pipewire/default.nix b/system/services/pipewire/default.nix similarity index 100% rename from system-config/services/pipewire/default.nix rename to system/services/pipewire/default.nix diff --git a/system-config/services/sddm/default.nix b/system/services/sddm/default.nix similarity index 100% rename from system-config/services/sddm/default.nix rename to system/services/sddm/default.nix diff --git a/system-config/services/wireguard/default.nix b/system/services/wireguard/default.nix similarity index 100% rename from system-config/services/wireguard/default.nix rename to system/services/wireguard/default.nix diff --git a/system-config/users/default.nix b/system/users/default.nix similarity index 60% rename from system-config/users/default.nix rename to system/users/default.nix index 81f374d..f7eb55a 100644 --- a/system-config/users/default.nix +++ b/system/users/default.nix @@ -1,6 +1,19 @@ { config, lib, pkgs, inputs, ... }: { + imports = let + dir = builtins.readDir ./.; + in (builtins.filter + (file: (dir.${file} == "directory")) + (builtins.attrNames dir) + ); + options.sysconfig = with lib; { + + sshHostKeys = lib.mkOption { + type = with lib.types; attrsOf str; + default = {}; + }; + users = let userType = types.submodule ({ name, ... }: { @@ -18,7 +31,7 @@ standalone = mkOption { type = with types; bool; - default = false; + default = true; description = "is this home-manager standalone?"; }; @@ -28,10 +41,32 @@ }; }; - sshKeys = mkOption { - type = with types; listOf str; - default = []; + isSuperuser = mkOption { + type = with types; bool; + default = false; + description = "sudo?"; }; + + usePresets = mkOption { + type = with types; bool; + default = true; + description = "search for predefined settings?"; + }; + + ssh = { + keys = mkOption { + type = with types; listOf str; + default = []; + description = "public keys used to login as this user"; + }; + + hosts = mkOption { + type = with types; listOf str; + default = []; + description = "user@host's used to login as this user"; + }; + }; + uid = mkOption { type = with types; nullOr int; @@ -56,7 +91,7 @@ }); in lib.mkOption { - type = lib.types.attrsOf userType; + type = with lib.types; attrsOf userType; default = {}; }; }; @@ -71,8 +106,8 @@ uid = cfg.uid; hashedPasswordFile = lib.mkIf (cfg.hashedPasswordFile != null) cfg.hashedPasswordFile; shell = cfg.shell; - extraGroups = cfg.extraGroups; - openssh.authorizedKeys.keys = lib.mkIf config.sysconfig.services.openssh.enable cfg.sshKeys; + extraGroups = cfg.extraGroups ++ (if cfg.isSuperuser then [ "wheel" ] else []); + openssh.authorizedKeys.keys = lib.mkIf config.sysconfig.services.openssh.enable (cfg.ssh.keys ++ (map (z: config.sysconfig.sshHostKeys.${z}) cfg.ssh.hosts)); packages = with pkgs; lib.mkIf (cfg.home-manager.enable && cfg.home-manager.standalone) [ home-manager ]; }) config.sysconfig.users; @@ -84,26 +119,26 @@ useUserPackages = true; sharedModules = [ inputs.sops-nix.homeManagerModules.sops - inputs.home-manager-config ]; users = builtins.listToAttrs (builtins.map (x: { name = x; value = (lib.mkMerge ([ - { - homeconfig = { - host = config.sysconfig.host; - name = x; - graphical = lib.mkDefault config.sysconfig.graphical; - }; - } - ] ++ (if inputs ? ${x} then [ (inputs.${x} /*{ config = config.home-manager.users.${x}; inherit lib pkgs inputs; }*/) ] else []) - ++ config.sysconfig.users.${x}.home-manager.extraModules)); + + (if let + dir = builtins.readDir ./.; + in dir ? ${x} && dir.${x} == "directory" then + import ./${x}/home-manager + else {}) + + (if inputs ? ${x} then inputs.${x} else {}) + + ] ++ config.sysconfig.users.${x}.home-manager.extraModules)); }) - (builtins.partition + (builtins.filter (y: (config.sysconfig.users.${y}.home-manager.enable && !config.sysconfig.users.${y}.home-manager.standalone)) (builtins.attrNames config.sysconfig.users) - ).right + ) ); }; diff --git a/system/users/nathan/default.nix b/system/users/nathan/default.nix new file mode 100644 index 0000000..949eb25 --- /dev/null +++ b/system/users/nathan/default.nix @@ -0,0 +1,5 @@ +{ ... }: { + imports = [ + ./system + ]; +} diff --git a/home-manager/users/nathan/default.nix b/system/users/nathan/home-manager/default.nix similarity index 64% rename from home-manager/users/nathan/default.nix rename to system/users/nathan/home-manager/default.nix index 840e152..3942c88 100644 --- a/home-manager/users/nathan/default.nix +++ b/system/users/nathan/home-manager/default.nix @@ -7,15 +7,50 @@ ./dotfiles ]; + options.homeconfig = with lib; { + + name = mkOption { + type = with types; nullOr str; + default = null; + }; + + graphical = mkOption { + type = with types; bool; + default = true; + }; + + standalone = mkOption { + type = with types; bool; + default = false; + }; + }; + + config = { homeconfig = { + name = "nathan"; + mpd.enable = lib.mkDefault true; calcurse.enable = lib.mkDefault true; git.enable = lib.mkDefault true; nh.enable = lib.mkDefault true; + + minimal = lib.mkDefault false; + hyprland.enable = lib.mkDefault config.homeconfig.graphical && !config.homeconfig.standalone; + hyprlock.enable = lib.mkDefault config.homeconfig.hyprland.enable; + wal.enable = lib.mkDefault config.homeconfig.graphical; + hyprpanel.enable = lib.mkDefault config.homeconfig.hyprland.enable; + rofi.enable = lib.mkDefault config.homeconfig.hyprland.enable; + firefox.enable = lib.mkDefault config.homeconfig.graphical; }; + home.username = lib.mkDefault config.homeconfig.name; + + home.homeDirectory = lib.mkDefault "/home/${config.home.username}"; + + programs.home-manager.enable = config.homeconfig.standalone; + home.stateVersion = "23.11"; home.pointerCursor = lib.mkIf config.homeconfig.graphical { @@ -39,7 +74,7 @@ defaultSopsFormat = "yaml"; }; - nix = lib.mkIf config.homeconfig.standalone.enable { + nix = lib.mkIf config.homeconfig.standalone { nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; settings = { experimental-features = [ "nix-command" "flakes" ]; diff --git a/home-manager/users/nathan/dotfiles/Wallpaper/Tron.jpg b/system/users/nathan/home-manager/dotfiles/Wallpaper/Tron.jpg similarity index 100% rename from home-manager/users/nathan/dotfiles/Wallpaper/Tron.jpg rename to system/users/nathan/home-manager/dotfiles/Wallpaper/Tron.jpg diff --git a/home-manager/users/nathan/dotfiles/Wallpaper/bluescape.jpg b/system/users/nathan/home-manager/dotfiles/Wallpaper/bluescape.jpg similarity index 100% rename from home-manager/users/nathan/dotfiles/Wallpaper/bluescape.jpg rename to system/users/nathan/home-manager/dotfiles/Wallpaper/bluescape.jpg diff --git a/home-manager/users/nathan/dotfiles/Wallpaper/galaxy.jpg b/system/users/nathan/home-manager/dotfiles/Wallpaper/galaxy.jpg similarity index 100% rename from home-manager/users/nathan/dotfiles/Wallpaper/galaxy.jpg rename to system/users/nathan/home-manager/dotfiles/Wallpaper/galaxy.jpg diff --git a/home-manager/users/nathan/dotfiles/Wallpaper/kurisu.gif b/system/users/nathan/home-manager/dotfiles/Wallpaper/kurisu.gif similarity index 100% rename from home-manager/users/nathan/dotfiles/Wallpaper/kurisu.gif rename to system/users/nathan/home-manager/dotfiles/Wallpaper/kurisu.gif diff --git a/home-manager/users/nathan/dotfiles/Wallpaper/kurisu.jpg b/system/users/nathan/home-manager/dotfiles/Wallpaper/kurisu.jpg similarity index 100% rename from home-manager/users/nathan/dotfiles/Wallpaper/kurisu.jpg rename to system/users/nathan/home-manager/dotfiles/Wallpaper/kurisu.jpg diff --git a/home-manager/users/nathan/dotfiles/Wallpaper/llenn.png b/system/users/nathan/home-manager/dotfiles/Wallpaper/llenn.png similarity index 100% rename from home-manager/users/nathan/dotfiles/Wallpaper/llenn.png rename to system/users/nathan/home-manager/dotfiles/Wallpaper/llenn.png diff --git a/home-manager/users/nathan/dotfiles/Wallpaper/megumin.png b/system/users/nathan/home-manager/dotfiles/Wallpaper/megumin.png similarity index 100% rename from home-manager/users/nathan/dotfiles/Wallpaper/megumin.png rename to system/users/nathan/home-manager/dotfiles/Wallpaper/megumin.png diff --git a/home-manager/users/nathan/dotfiles/Wallpaper/megumin1.gif b/system/users/nathan/home-manager/dotfiles/Wallpaper/megumin1.gif similarity index 100% rename from home-manager/users/nathan/dotfiles/Wallpaper/megumin1.gif rename to system/users/nathan/home-manager/dotfiles/Wallpaper/megumin1.gif diff --git a/home-manager/users/nathan/dotfiles/Wallpaper/megumin2.gif b/system/users/nathan/home-manager/dotfiles/Wallpaper/megumin2.gif similarity index 100% rename from home-manager/users/nathan/dotfiles/Wallpaper/megumin2.gif rename to system/users/nathan/home-manager/dotfiles/Wallpaper/megumin2.gif diff --git a/home-manager/users/nathan/dotfiles/Wallpaper/ngnl.jpg b/system/users/nathan/home-manager/dotfiles/Wallpaper/ngnl.jpg similarity index 100% rename from home-manager/users/nathan/dotfiles/Wallpaper/ngnl.jpg rename to system/users/nathan/home-manager/dotfiles/Wallpaper/ngnl.jpg diff --git a/home-manager/users/nathan/dotfiles/Wallpaper/orangescape.jpg b/system/users/nathan/home-manager/dotfiles/Wallpaper/orangescape.jpg similarity index 100% rename from home-manager/users/nathan/dotfiles/Wallpaper/orangescape.jpg rename to system/users/nathan/home-manager/dotfiles/Wallpaper/orangescape.jpg diff --git a/home-manager/users/nathan/dotfiles/Wallpaper/pink_fc.mp4 b/system/users/nathan/home-manager/dotfiles/Wallpaper/pink_fc.mp4 similarity index 100% rename from home-manager/users/nathan/dotfiles/Wallpaper/pink_fc.mp4 rename to system/users/nathan/home-manager/dotfiles/Wallpaper/pink_fc.mp4 diff --git a/home-manager/users/nathan/dotfiles/Wallpaper/rezero.gif b/system/users/nathan/home-manager/dotfiles/Wallpaper/rezero.gif similarity index 100% rename from home-manager/users/nathan/dotfiles/Wallpaper/rezero.gif rename to system/users/nathan/home-manager/dotfiles/Wallpaper/rezero.gif diff --git a/home-manager/users/nathan/dotfiles/Wallpaper/sao.gif b/system/users/nathan/home-manager/dotfiles/Wallpaper/sao.gif similarity index 100% rename from home-manager/users/nathan/dotfiles/Wallpaper/sao.gif rename to system/users/nathan/home-manager/dotfiles/Wallpaper/sao.gif diff --git a/home-manager/users/nathan/dotfiles/Wallpaper/sao.png b/system/users/nathan/home-manager/dotfiles/Wallpaper/sao.png similarity index 100% rename from home-manager/users/nathan/dotfiles/Wallpaper/sao.png rename to system/users/nathan/home-manager/dotfiles/Wallpaper/sao.png diff --git a/home-manager/users/nathan/dotfiles/Wallpaper/sinon.gif b/system/users/nathan/home-manager/dotfiles/Wallpaper/sinon.gif similarity index 100% rename from home-manager/users/nathan/dotfiles/Wallpaper/sinon.gif rename to system/users/nathan/home-manager/dotfiles/Wallpaper/sinon.gif diff --git a/home-manager/users/nathan/dotfiles/default.nix b/system/users/nathan/home-manager/dotfiles/default.nix similarity index 100% rename from home-manager/users/nathan/dotfiles/default.nix rename to system/users/nathan/home-manager/dotfiles/default.nix diff --git a/home-manager/users/nathan/dotfiles/hypr/hyprlock.conf b/system/users/nathan/home-manager/dotfiles/hypr/hyprlock.conf similarity index 100% rename from home-manager/users/nathan/dotfiles/hypr/hyprlock.conf rename to system/users/nathan/home-manager/dotfiles/hypr/hyprlock.conf diff --git a/home-manager/users/nathan/dotfiles/hypr/main.conf b/system/users/nathan/home-manager/dotfiles/hypr/main.conf similarity index 100% rename from home-manager/users/nathan/dotfiles/hypr/main.conf rename to system/users/nathan/home-manager/dotfiles/hypr/main.conf diff --git a/home-manager/users/nathan/dotfiles/hypr/pyprland.toml b/system/users/nathan/home-manager/dotfiles/hypr/pyprland.toml similarity index 100% rename from home-manager/users/nathan/dotfiles/hypr/pyprland.toml rename to system/users/nathan/home-manager/dotfiles/hypr/pyprland.toml diff --git a/home-manager/users/nathan/dotfiles/hyprpanel/config.json b/system/users/nathan/home-manager/dotfiles/hyprpanel/config.json similarity index 100% rename from home-manager/users/nathan/dotfiles/hyprpanel/config.json rename to system/users/nathan/home-manager/dotfiles/hyprpanel/config.json diff --git a/home-manager/users/nathan/dotfiles/hyprpanel/modules.json b/system/users/nathan/home-manager/dotfiles/hyprpanel/modules.json similarity index 100% rename from home-manager/users/nathan/dotfiles/hyprpanel/modules.json rename to system/users/nathan/home-manager/dotfiles/hyprpanel/modules.json diff --git a/home-manager/users/nathan/dotfiles/hyprpanel/modules.scss b/system/users/nathan/home-manager/dotfiles/hyprpanel/modules.scss similarity index 100% rename from home-manager/users/nathan/dotfiles/hyprpanel/modules.scss rename to system/users/nathan/home-manager/dotfiles/hyprpanel/modules.scss diff --git a/home-manager/users/nathan/dotfiles/ohmyposh/ohmyposh.toml b/system/users/nathan/home-manager/dotfiles/ohmyposh/ohmyposh.toml similarity index 100% rename from home-manager/users/nathan/dotfiles/ohmyposh/ohmyposh.toml rename to system/users/nathan/home-manager/dotfiles/ohmyposh/ohmyposh.toml diff --git a/home-manager/users/nathan/dotfiles/quickshell/modules/ActiveWindow.qml b/system/users/nathan/home-manager/dotfiles/quickshell/modules/ActiveWindow.qml similarity index 100% rename from home-manager/users/nathan/dotfiles/quickshell/modules/ActiveWindow.qml rename to system/users/nathan/home-manager/dotfiles/quickshell/modules/ActiveWindow.qml diff --git a/home-manager/users/nathan/dotfiles/quickshell/modules/Bar.qml b/system/users/nathan/home-manager/dotfiles/quickshell/modules/Bar.qml similarity index 100% rename from home-manager/users/nathan/dotfiles/quickshell/modules/Bar.qml rename to system/users/nathan/home-manager/dotfiles/quickshell/modules/Bar.qml diff --git a/home-manager/users/nathan/dotfiles/quickshell/modules/Battery.qml b/system/users/nathan/home-manager/dotfiles/quickshell/modules/Battery.qml similarity index 100% rename from home-manager/users/nathan/dotfiles/quickshell/modules/Battery.qml rename to system/users/nathan/home-manager/dotfiles/quickshell/modules/Battery.qml diff --git a/home-manager/users/nathan/dotfiles/quickshell/modules/Bluetooth.qml b/system/users/nathan/home-manager/dotfiles/quickshell/modules/Bluetooth.qml similarity index 100% rename from home-manager/users/nathan/dotfiles/quickshell/modules/Bluetooth.qml rename to system/users/nathan/home-manager/dotfiles/quickshell/modules/Bluetooth.qml diff --git a/home-manager/users/nathan/dotfiles/quickshell/modules/Clock.qml b/system/users/nathan/home-manager/dotfiles/quickshell/modules/Clock.qml similarity index 100% rename from home-manager/users/nathan/dotfiles/quickshell/modules/Clock.qml rename to system/users/nathan/home-manager/dotfiles/quickshell/modules/Clock.qml diff --git a/home-manager/users/nathan/dotfiles/quickshell/modules/Hyprsunset.qml b/system/users/nathan/home-manager/dotfiles/quickshell/modules/Hyprsunset.qml similarity index 100% rename from home-manager/users/nathan/dotfiles/quickshell/modules/Hyprsunset.qml rename to system/users/nathan/home-manager/dotfiles/quickshell/modules/Hyprsunset.qml diff --git a/home-manager/users/nathan/dotfiles/quickshell/modules/IdleInhibitor.qml b/system/users/nathan/home-manager/dotfiles/quickshell/modules/IdleInhibitor.qml similarity index 100% rename from home-manager/users/nathan/dotfiles/quickshell/modules/IdleInhibitor.qml rename to system/users/nathan/home-manager/dotfiles/quickshell/modules/IdleInhibitor.qml diff --git a/home-manager/users/nathan/dotfiles/quickshell/modules/Launcher.qml b/system/users/nathan/home-manager/dotfiles/quickshell/modules/Launcher.qml similarity index 100% rename from home-manager/users/nathan/dotfiles/quickshell/modules/Launcher.qml rename to system/users/nathan/home-manager/dotfiles/quickshell/modules/Launcher.qml diff --git a/home-manager/users/nathan/dotfiles/quickshell/modules/Media.qml b/system/users/nathan/home-manager/dotfiles/quickshell/modules/Media.qml similarity index 100% rename from home-manager/users/nathan/dotfiles/quickshell/modules/Media.qml rename to system/users/nathan/home-manager/dotfiles/quickshell/modules/Media.qml diff --git a/home-manager/users/nathan/dotfiles/quickshell/modules/Notif.qml b/system/users/nathan/home-manager/dotfiles/quickshell/modules/Notif.qml similarity index 100% rename from home-manager/users/nathan/dotfiles/quickshell/modules/Notif.qml rename to system/users/nathan/home-manager/dotfiles/quickshell/modules/Notif.qml diff --git a/home-manager/users/nathan/dotfiles/quickshell/modules/Notifications.qml b/system/users/nathan/home-manager/dotfiles/quickshell/modules/Notifications.qml similarity index 100% rename from home-manager/users/nathan/dotfiles/quickshell/modules/Notifications.qml rename to system/users/nathan/home-manager/dotfiles/quickshell/modules/Notifications.qml diff --git a/home-manager/users/nathan/dotfiles/quickshell/modules/Power.qml b/system/users/nathan/home-manager/dotfiles/quickshell/modules/Power.qml similarity index 100% rename from home-manager/users/nathan/dotfiles/quickshell/modules/Power.qml rename to system/users/nathan/home-manager/dotfiles/quickshell/modules/Power.qml diff --git a/home-manager/users/nathan/dotfiles/quickshell/modules/Tray.qml b/system/users/nathan/home-manager/dotfiles/quickshell/modules/Tray.qml similarity index 100% rename from home-manager/users/nathan/dotfiles/quickshell/modules/Tray.qml rename to system/users/nathan/home-manager/dotfiles/quickshell/modules/Tray.qml diff --git a/home-manager/users/nathan/dotfiles/quickshell/modules/Volume.qml b/system/users/nathan/home-manager/dotfiles/quickshell/modules/Volume.qml similarity index 100% rename from home-manager/users/nathan/dotfiles/quickshell/modules/Volume.qml rename to system/users/nathan/home-manager/dotfiles/quickshell/modules/Volume.qml diff --git a/home-manager/users/nathan/dotfiles/quickshell/modules/Wifi.qml b/system/users/nathan/home-manager/dotfiles/quickshell/modules/Wifi.qml similarity index 100% rename from home-manager/users/nathan/dotfiles/quickshell/modules/Wifi.qml rename to system/users/nathan/home-manager/dotfiles/quickshell/modules/Wifi.qml diff --git a/home-manager/users/nathan/dotfiles/quickshell/modules/Workspaces.qml b/system/users/nathan/home-manager/dotfiles/quickshell/modules/Workspaces.qml similarity index 100% rename from home-manager/users/nathan/dotfiles/quickshell/modules/Workspaces.qml rename to system/users/nathan/home-manager/dotfiles/quickshell/modules/Workspaces.qml diff --git a/home-manager/users/nathan/dotfiles/quickshell/shell.qml b/system/users/nathan/home-manager/dotfiles/quickshell/shell.qml similarity index 100% rename from home-manager/users/nathan/dotfiles/quickshell/shell.qml rename to system/users/nathan/home-manager/dotfiles/quickshell/shell.qml diff --git a/home-manager/users/nathan/dotfiles/swaylock/config b/system/users/nathan/home-manager/dotfiles/swaylock/config similarity index 100% rename from home-manager/users/nathan/dotfiles/swaylock/config rename to system/users/nathan/home-manager/dotfiles/swaylock/config diff --git a/home-manager/users/nathan/dotfiles/wal/templates/cava_config b/system/users/nathan/home-manager/dotfiles/wal/templates/cava_config similarity index 100% rename from home-manager/users/nathan/dotfiles/wal/templates/cava_config rename to system/users/nathan/home-manager/dotfiles/wal/templates/cava_config diff --git a/home-manager/users/nathan/dotfiles/wal/templates/colors-discord.css b/system/users/nathan/home-manager/dotfiles/wal/templates/colors-discord.css similarity index 100% rename from home-manager/users/nathan/dotfiles/wal/templates/colors-discord.css rename to system/users/nathan/home-manager/dotfiles/wal/templates/colors-discord.css diff --git a/home-manager/users/nathan/dotfiles/wal/templates/colors-hypr.conf b/system/users/nathan/home-manager/dotfiles/wal/templates/colors-hypr.conf similarity index 100% rename from home-manager/users/nathan/dotfiles/wal/templates/colors-hypr.conf rename to system/users/nathan/home-manager/dotfiles/wal/templates/colors-hypr.conf diff --git a/home-manager/users/nathan/packages/default.nix b/system/users/nathan/home-manager/packages/default.nix similarity index 100% rename from home-manager/users/nathan/packages/default.nix rename to system/users/nathan/home-manager/packages/default.nix diff --git a/home-manager/users/nathan/packages/scripts/default.nix b/system/users/nathan/home-manager/packages/scripts/default.nix similarity index 100% rename from home-manager/users/nathan/packages/scripts/default.nix rename to system/users/nathan/home-manager/packages/scripts/default.nix diff --git a/home-manager/users/nathan/programs/calcurse/default.nix b/system/users/nathan/home-manager/programs/calcurse/default.nix similarity index 100% rename from home-manager/users/nathan/programs/calcurse/default.nix rename to system/users/nathan/home-manager/programs/calcurse/default.nix diff --git a/home-manager/users/nathan/programs/default.nix b/system/users/nathan/home-manager/programs/default.nix similarity index 100% rename from home-manager/users/nathan/programs/default.nix rename to system/users/nathan/home-manager/programs/default.nix diff --git a/home-manager/users/nathan/programs/firefox/default.nix b/system/users/nathan/home-manager/programs/firefox/default.nix similarity index 100% rename from home-manager/users/nathan/programs/firefox/default.nix rename to system/users/nathan/home-manager/programs/firefox/default.nix diff --git a/home-manager/users/nathan/programs/git/default.nix b/system/users/nathan/home-manager/programs/git/default.nix similarity index 100% rename from home-manager/users/nathan/programs/git/default.nix rename to system/users/nathan/home-manager/programs/git/default.nix diff --git a/home-manager/users/nathan/programs/hyprland/default.nix b/system/users/nathan/home-manager/programs/hyprland/default.nix similarity index 100% rename from home-manager/users/nathan/programs/hyprland/default.nix rename to system/users/nathan/home-manager/programs/hyprland/default.nix diff --git a/home-manager/users/nathan/programs/hyprlock/default.nix b/system/users/nathan/home-manager/programs/hyprlock/default.nix similarity index 100% rename from home-manager/users/nathan/programs/hyprlock/default.nix rename to system/users/nathan/home-manager/programs/hyprlock/default.nix diff --git a/home-manager/users/nathan/programs/hyprpanel/default.nix b/system/users/nathan/home-manager/programs/hyprpanel/default.nix similarity index 100% rename from home-manager/users/nathan/programs/hyprpanel/default.nix rename to system/users/nathan/home-manager/programs/hyprpanel/default.nix diff --git a/home-manager/users/nathan/programs/nh/default.nix b/system/users/nathan/home-manager/programs/nh/default.nix similarity index 100% rename from home-manager/users/nathan/programs/nh/default.nix rename to system/users/nathan/home-manager/programs/nh/default.nix diff --git a/home-manager/users/nathan/programs/pywal/default.nix b/system/users/nathan/home-manager/programs/pywal/default.nix similarity index 100% rename from home-manager/users/nathan/programs/pywal/default.nix rename to system/users/nathan/home-manager/programs/pywal/default.nix diff --git a/home-manager/users/nathan/programs/rofi/default.nix b/system/users/nathan/home-manager/programs/rofi/default.nix similarity index 100% rename from home-manager/users/nathan/programs/rofi/default.nix rename to system/users/nathan/home-manager/programs/rofi/default.nix diff --git a/home-manager/users/nathan/programs/terminal/bash/default.nix b/system/users/nathan/home-manager/programs/terminal/bash/default.nix similarity index 100% rename from home-manager/users/nathan/programs/terminal/bash/default.nix rename to system/users/nathan/home-manager/programs/terminal/bash/default.nix diff --git a/home-manager/users/nathan/programs/terminal/bat/default.nix b/system/users/nathan/home-manager/programs/terminal/bat/default.nix similarity index 100% rename from home-manager/users/nathan/programs/terminal/bat/default.nix rename to system/users/nathan/home-manager/programs/terminal/bat/default.nix diff --git a/home-manager/users/nathan/programs/terminal/default.nix b/system/users/nathan/home-manager/programs/terminal/default.nix similarity index 100% rename from home-manager/users/nathan/programs/terminal/default.nix rename to system/users/nathan/home-manager/programs/terminal/default.nix diff --git a/home-manager/users/nathan/programs/terminal/eza/default.nix b/system/users/nathan/home-manager/programs/terminal/eza/default.nix similarity index 100% rename from home-manager/users/nathan/programs/terminal/eza/default.nix rename to system/users/nathan/home-manager/programs/terminal/eza/default.nix diff --git a/home-manager/users/nathan/programs/terminal/fzf/default.nix b/system/users/nathan/home-manager/programs/terminal/fzf/default.nix similarity index 100% rename from home-manager/users/nathan/programs/terminal/fzf/default.nix rename to system/users/nathan/home-manager/programs/terminal/fzf/default.nix diff --git a/home-manager/users/nathan/programs/terminal/kitty/default.nix b/system/users/nathan/home-manager/programs/terminal/kitty/default.nix similarity index 100% rename from home-manager/users/nathan/programs/terminal/kitty/default.nix rename to system/users/nathan/home-manager/programs/terminal/kitty/default.nix diff --git a/home-manager/users/nathan/programs/terminal/lf/default.nix b/system/users/nathan/home-manager/programs/terminal/lf/default.nix similarity index 100% rename from home-manager/users/nathan/programs/terminal/lf/default.nix rename to system/users/nathan/home-manager/programs/terminal/lf/default.nix diff --git a/home-manager/users/nathan/programs/terminal/ohmyposh/default.nix b/system/users/nathan/home-manager/programs/terminal/ohmyposh/default.nix similarity index 100% rename from home-manager/users/nathan/programs/terminal/ohmyposh/default.nix rename to system/users/nathan/home-manager/programs/terminal/ohmyposh/default.nix diff --git a/home-manager/users/nathan/programs/terminal/ssh/default.nix b/system/users/nathan/home-manager/programs/terminal/ssh/default.nix similarity index 100% rename from home-manager/users/nathan/programs/terminal/ssh/default.nix rename to system/users/nathan/home-manager/programs/terminal/ssh/default.nix diff --git a/home-manager/users/nathan/programs/terminal/tmux/default.nix b/system/users/nathan/home-manager/programs/terminal/tmux/default.nix similarity index 100% rename from home-manager/users/nathan/programs/terminal/tmux/default.nix rename to system/users/nathan/home-manager/programs/terminal/tmux/default.nix diff --git a/home-manager/users/nathan/programs/terminal/zoxide/default.nix b/system/users/nathan/home-manager/programs/terminal/zoxide/default.nix similarity index 100% rename from home-manager/users/nathan/programs/terminal/zoxide/default.nix rename to system/users/nathan/home-manager/programs/terminal/zoxide/default.nix diff --git a/home-manager/users/nathan/programs/terminal/zsh/default.nix b/system/users/nathan/home-manager/programs/terminal/zsh/default.nix similarity index 100% rename from home-manager/users/nathan/programs/terminal/zsh/default.nix rename to system/users/nathan/home-manager/programs/terminal/zsh/default.nix diff --git a/home-manager/users/nathan/secrets.yaml b/system/users/nathan/home-manager/secrets.yaml similarity index 100% rename from home-manager/users/nathan/secrets.yaml rename to system/users/nathan/home-manager/secrets.yaml diff --git a/home-manager/users/nathan/services/custom/default.nix b/system/users/nathan/home-manager/services/custom/default.nix similarity index 100% rename from home-manager/users/nathan/services/custom/default.nix rename to system/users/nathan/home-manager/services/custom/default.nix diff --git a/home-manager/users/nathan/services/default.nix b/system/users/nathan/home-manager/services/default.nix similarity index 100% rename from home-manager/users/nathan/services/default.nix rename to system/users/nathan/home-manager/services/default.nix diff --git a/home-manager/users/nathan/services/mpd/default.nix b/system/users/nathan/home-manager/services/mpd/default.nix similarity index 100% rename from home-manager/users/nathan/services/mpd/default.nix rename to system/users/nathan/home-manager/services/mpd/default.nix diff --git a/system/users/nathan/system/default.nix b/system/users/nathan/system/default.nix new file mode 100644 index 0000000..02e7cca --- /dev/null +++ b/system/users/nathan/system/default.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: { + + config = with config.sysconfig; + lib.mkIf (users ? nathan && users.nathan.usePresets) { + + sops.secrets."nathan/pass".neededForUsers = true; + + users.users.nathan = { + shell = pkgs.zsh; + name = "nathan"; + isNormalUser = true; + #hashedPasswordFile = lib.mkIf (cfg.hashedPasswordFile != null) cfg.hashedPasswordFile; + extraGroups = [ "networkmanager" ]; + openssh.authorizedKeys.keys = lib.mkIf config.sysconfig.services.openssh.enable (cfg.ssh.keys ++ (map (z: config.sysconfig.sshHostKeys.${z}) cfg.ssh.hosts)); + packages = with pkgs; lib.mkIf (cfg.home-manager.enable && cfg.home-manager.standalone) [ home-manager ]; + + }; + }; +} diff --git a/templates/home-manager/.sops.yaml b/templates/home-manager/.sops.yaml new file mode 100644 index 0000000..0a2ab72 --- /dev/null +++ b/templates/home-manager/.sops.yaml @@ -0,0 +1,33 @@ +keys: + - &homebox age1640eg0pnmkruc89m5xguz0m8fek44fl4tzez6qwuzlz6kmapqewsp8esxd + - &laptop age1yqgyp2uxz4lzrc9f9ka0mfjl5fr6ahf8nf24nlmran2wulg6fpvq9hyp9q + - &android age12pnf36uqesjmy3e0lythfnpwam3zg5mv8m936fc4jphy4ces2fdqwn0s74 +creation_rules: + - path_regex: homebox/secrets.yaml$ + key_groups: + - age: + - *homebox + - path_regex: laptop/secrets.yaml$ + key_groups: + - age: + - *laptop + - path_regex: pi4/secrets.yaml$ + key_groups: + - age: + - *laptop + - path_regex: live/secrets.yaml$ + key_groups: + - age: + - *laptop + - path_regex: nathan/secrets.yaml$ + key_groups: + - age: + - *laptop + - *homebox + - *android + - path_regex: system-config/secrets.yaml$ + key_groups: + - age: + - *laptop + - *homebox + - *android diff --git a/templates/home-manager/flake.nix b/templates/home-manager/flake.nix new file mode 100644 index 0000000..90fab21 --- /dev/null +++ b/templates/home-manager/flake.nix @@ -0,0 +1,50 @@ +{ + + description = "System Configuration"; + + inputs = { + + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; + + home-manager = { + url = "github:nix-community/home-manager/release-25.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + olympus = { + url = "git+ssh://gitea@esotericbytes.com/Blunkall-Technologies/Olympus"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; + }; + + outputs = { self, nixpkgs, olympus, ... }: let + host = "hostname"; + + in { + + nixosConfigurations."${host}" = nixpkgs.lib.nixosSystem { + + specialArgs = { + }; + + modules = [ + { sysconfig.host = host; } + ./configuration.nix + olympus.live + ]; + }; + + templates.default = { + welcomeText = '' + # NixOS Configuration Template + Have Fun! + ''; + description = '' + Generate this where you want your config. + ''; + source = ./.; + }; + + }; +} diff --git a/templates/home-manager/home.nix b/templates/home-manager/home.nix new file mode 100644 index 0000000..1e31884 --- /dev/null +++ b/templates/home-manager/home.nix @@ -0,0 +1,90 @@ +# 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, ... }: + +{ + + imports = [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + config = { + + boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ]; + + hardware.nvidia = { + modesetting.enable = true; + powerManagement.enable = true; + powerManagement.finegrained = true; + open = false; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + + prime = { +# Make sure to use the correct Bus ID values for your system! + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; +# WARNING: sync and offload are mutually exclusive. +# You can only pick one!! +#sync.enable = true; + offload = { + enable = true; + enableOffloadCmd = true; + }; + }; + }; + + sysconfig = { + users = { + nathan = { + isSuperuser = true; + extraGroups = [ "networkmanager" ]; + hashedPasswordFile = config.sops.secrets."nathan/pass".path; + shell = pkgs.zsh; + home-manager = { + enable = true; + standalone = false; + extraModules = [ + { + homeconfig = { + minimal = false; + hyprland.enable = true; + hyprlock.enable = true; + wal.enable = true; + mpd.enable = true; + hyprpanel.enable = true; + calcurse.enable = true; + rofi.enable = true; + firefox.enable = true; + git.enable = true; + nh.enable = true; + }; + + #monitor=eDP-1, addreserved, 40,0,0,0 + wayland.windowManager.hyprland.extraConfig = '' + monitor=eDP-1,1920x1080@60,0x0,1 + ''; + + } + ]; + }; + }; + }; + }; + + + services.xserver.videoDrivers = [ "nvidia" ]; + + +# 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 = "23.05"; # Did you read the comment? + }; + +} diff --git a/templates/nix-on-droid/.sops.yaml b/templates/nix-on-droid/.sops.yaml new file mode 100644 index 0000000..0a2ab72 --- /dev/null +++ b/templates/nix-on-droid/.sops.yaml @@ -0,0 +1,33 @@ +keys: + - &homebox age1640eg0pnmkruc89m5xguz0m8fek44fl4tzez6qwuzlz6kmapqewsp8esxd + - &laptop age1yqgyp2uxz4lzrc9f9ka0mfjl5fr6ahf8nf24nlmran2wulg6fpvq9hyp9q + - &android age12pnf36uqesjmy3e0lythfnpwam3zg5mv8m936fc4jphy4ces2fdqwn0s74 +creation_rules: + - path_regex: homebox/secrets.yaml$ + key_groups: + - age: + - *homebox + - path_regex: laptop/secrets.yaml$ + key_groups: + - age: + - *laptop + - path_regex: pi4/secrets.yaml$ + key_groups: + - age: + - *laptop + - path_regex: live/secrets.yaml$ + key_groups: + - age: + - *laptop + - path_regex: nathan/secrets.yaml$ + key_groups: + - age: + - *laptop + - *homebox + - *android + - path_regex: system-config/secrets.yaml$ + key_groups: + - age: + - *laptop + - *homebox + - *android diff --git a/templates/nix-on-droid/configuration.nix b/templates/nix-on-droid/configuration.nix new file mode 100644 index 0000000..1e31884 --- /dev/null +++ b/templates/nix-on-droid/configuration.nix @@ -0,0 +1,90 @@ +# 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, ... }: + +{ + + imports = [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + config = { + + boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ]; + + hardware.nvidia = { + modesetting.enable = true; + powerManagement.enable = true; + powerManagement.finegrained = true; + open = false; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + + prime = { +# Make sure to use the correct Bus ID values for your system! + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; +# WARNING: sync and offload are mutually exclusive. +# You can only pick one!! +#sync.enable = true; + offload = { + enable = true; + enableOffloadCmd = true; + }; + }; + }; + + sysconfig = { + users = { + nathan = { + isSuperuser = true; + extraGroups = [ "networkmanager" ]; + hashedPasswordFile = config.sops.secrets."nathan/pass".path; + shell = pkgs.zsh; + home-manager = { + enable = true; + standalone = false; + extraModules = [ + { + homeconfig = { + minimal = false; + hyprland.enable = true; + hyprlock.enable = true; + wal.enable = true; + mpd.enable = true; + hyprpanel.enable = true; + calcurse.enable = true; + rofi.enable = true; + firefox.enable = true; + git.enable = true; + nh.enable = true; + }; + + #monitor=eDP-1, addreserved, 40,0,0,0 + wayland.windowManager.hyprland.extraConfig = '' + monitor=eDP-1,1920x1080@60,0x0,1 + ''; + + } + ]; + }; + }; + }; + }; + + + services.xserver.videoDrivers = [ "nvidia" ]; + + +# 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 = "23.05"; # Did you read the comment? + }; + +} diff --git a/templates/nix-on-droid/flake.nix b/templates/nix-on-droid/flake.nix new file mode 100644 index 0000000..90fab21 --- /dev/null +++ b/templates/nix-on-droid/flake.nix @@ -0,0 +1,50 @@ +{ + + description = "System Configuration"; + + inputs = { + + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; + + home-manager = { + url = "github:nix-community/home-manager/release-25.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + olympus = { + url = "git+ssh://gitea@esotericbytes.com/Blunkall-Technologies/Olympus"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; + }; + + outputs = { self, nixpkgs, olympus, ... }: let + host = "hostname"; + + in { + + nixosConfigurations."${host}" = nixpkgs.lib.nixosSystem { + + specialArgs = { + }; + + modules = [ + { sysconfig.host = host; } + ./configuration.nix + olympus.live + ]; + }; + + templates.default = { + welcomeText = '' + # NixOS Configuration Template + Have Fun! + ''; + description = '' + Generate this where you want your config. + ''; + source = ./.; + }; + + }; +} diff --git a/templates/nixos/.sops.yaml b/templates/nixos/.sops.yaml new file mode 100644 index 0000000..0a2ab72 --- /dev/null +++ b/templates/nixos/.sops.yaml @@ -0,0 +1,33 @@ +keys: + - &homebox age1640eg0pnmkruc89m5xguz0m8fek44fl4tzez6qwuzlz6kmapqewsp8esxd + - &laptop age1yqgyp2uxz4lzrc9f9ka0mfjl5fr6ahf8nf24nlmran2wulg6fpvq9hyp9q + - &android age12pnf36uqesjmy3e0lythfnpwam3zg5mv8m936fc4jphy4ces2fdqwn0s74 +creation_rules: + - path_regex: homebox/secrets.yaml$ + key_groups: + - age: + - *homebox + - path_regex: laptop/secrets.yaml$ + key_groups: + - age: + - *laptop + - path_regex: pi4/secrets.yaml$ + key_groups: + - age: + - *laptop + - path_regex: live/secrets.yaml$ + key_groups: + - age: + - *laptop + - path_regex: nathan/secrets.yaml$ + key_groups: + - age: + - *laptop + - *homebox + - *android + - path_regex: system-config/secrets.yaml$ + key_groups: + - age: + - *laptop + - *homebox + - *android diff --git a/templates/nixos/configuration.nix b/templates/nixos/configuration.nix new file mode 100644 index 0000000..1e31884 --- /dev/null +++ b/templates/nixos/configuration.nix @@ -0,0 +1,90 @@ +# 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, ... }: + +{ + + imports = [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + config = { + + boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ]; + + hardware.nvidia = { + modesetting.enable = true; + powerManagement.enable = true; + powerManagement.finegrained = true; + open = false; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + + prime = { +# Make sure to use the correct Bus ID values for your system! + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; +# WARNING: sync and offload are mutually exclusive. +# You can only pick one!! +#sync.enable = true; + offload = { + enable = true; + enableOffloadCmd = true; + }; + }; + }; + + sysconfig = { + users = { + nathan = { + isSuperuser = true; + extraGroups = [ "networkmanager" ]; + hashedPasswordFile = config.sops.secrets."nathan/pass".path; + shell = pkgs.zsh; + home-manager = { + enable = true; + standalone = false; + extraModules = [ + { + homeconfig = { + minimal = false; + hyprland.enable = true; + hyprlock.enable = true; + wal.enable = true; + mpd.enable = true; + hyprpanel.enable = true; + calcurse.enable = true; + rofi.enable = true; + firefox.enable = true; + git.enable = true; + nh.enable = true; + }; + + #monitor=eDP-1, addreserved, 40,0,0,0 + wayland.windowManager.hyprland.extraConfig = '' + monitor=eDP-1,1920x1080@60,0x0,1 + ''; + + } + ]; + }; + }; + }; + }; + + + services.xserver.videoDrivers = [ "nvidia" ]; + + +# 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 = "23.05"; # Did you read the comment? + }; + +} diff --git a/templates/nixos/flake.nix b/templates/nixos/flake.nix new file mode 100644 index 0000000..90fab21 --- /dev/null +++ b/templates/nixos/flake.nix @@ -0,0 +1,50 @@ +{ + + description = "System Configuration"; + + inputs = { + + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; + + home-manager = { + url = "github:nix-community/home-manager/release-25.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + olympus = { + url = "git+ssh://gitea@esotericbytes.com/Blunkall-Technologies/Olympus"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; + }; + + outputs = { self, nixpkgs, olympus, ... }: let + host = "hostname"; + + in { + + nixosConfigurations."${host}" = nixpkgs.lib.nixosSystem { + + specialArgs = { + }; + + modules = [ + { sysconfig.host = host; } + ./configuration.nix + olympus.live + ]; + }; + + templates.default = { + welcomeText = '' + # NixOS Configuration Template + Have Fun! + ''; + description = '' + Generate this where you want your config. + ''; + source = ./.; + }; + + }; +}