From 37dcf27b050965465c9719451da8e1af9ddb0fe9 Mon Sep 17 00:00:00 2001 From: Toast Date: Sun, 12 Nov 2023 21:13:21 +0100 Subject: [PATCH] Flake: formatting and code cleanup --- flake.nix | 292 +++++++++++++++++++++++++++--------------------------- 1 file changed, 146 insertions(+), 146 deletions(-) diff --git a/flake.nix b/flake.nix index d00bb06..0db6b75 100755 --- a/flake.nix +++ b/flake.nix @@ -1,158 +1,158 @@ { -description = "Configuration for Everest"; + description = "Configuration for Everest"; -inputs = { - nixpkgs.url = "nixpkgs/nixos-23.05"; - nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; + inputs = { + nixpkgs.url = "nixpkgs/nixos-23.05"; + nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; - agenix = { - url = "github:ryantm/agenix"; - inputs = { - nixpkgs.follows = "nixpkgs"; - darwin.follows = ""; # Not using this on MacOS, so this doesn't pull it's dependencies - }; - }; - - home-manager = { - url = "github:nix-community/home-manager/release-23.05"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - home-manager-unstable = { - url = "github:nix-community/home-manager/"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; - }; - - nixos-hardware.url = "github:NixOS/nixos-hardware/master"; - - jovian = { - url = "github:Jovian-Experiments/Jovian-NixOS"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; - }; - - nix-impermanence.url = "github:nix-community/impermanence"; - - /* - These are the same input, just following different nixpkgs versions - This avoids some wierdness when using one that follows unstable on a stable nixpkgs - */ - nix-index-db = { - url = "github:Mic92/nix-index-database"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - nix-index-db-unstable = { - url = "github:Mic92/nix-index-database"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; - }; - - plasma-manager = { - url = "github:pjones/plasma-manager"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; - inputs.home-manager.follows = "home-manager-unstable"; - }; - - catppuccin-vsc = { - url = "github:catppuccin/vscode"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; - }; - - vscode-extensions = { - url = "github:nix-community/nix-vscode-extensions"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; - }; -}; - -outputs = { self, nixpkgs, nixpkgs-unstable, agenix, home-manager, home-manager-unstable, nixos-hardware, nix-impermanence, nix-index-db, nix-index-db-unstable, jovian, plasma-manager, catppuccin-vsc, ... } @inputs: { - - devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell { - name = "Environment for toast's nixos configurations"; - # The agenix cli is not needed to activate a configuration, so instead of installing it - # I'll just add it to de devShell, since that's the only real time I'm going to use it. - packages = with nixpkgs.legacyPackages.x86_64-linux; [ - agenix.packages.x86_64-linux.default - git - plasma5Packages.plasma-sdk - nix-diff - ]; - shellHook ='' - export PS1="$PS1(toast-configs)> " - ''; - }; - packages = { - x86_64-linux = with import nixpkgs-unstable { system = "x86_64-linux"; }; { - pseint = callPackage ./pkgs/pseint.nix {}; - anything-sync-daemon = callPackage ./pkgs/anything-sync-daemon {}; - discord-krisp-fixer = callPackage ./pkgs/discord-krisp-fixer {}; - }; - }; - nixosConfigurations = { - Archie = nixpkgs-unstable.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { systemPkgs = inputs.nixpkgs-unstable; flakeSelf = self; }; - /* - I used to set up nixpkgs in the flake, but doing that made - defining overlays in modules impossible (or at least I could - not figure out how) - Also has nice side effect of making it easier to add new systems :3 - */ - modules = [ - agenix.nixosModules.default - home-manager-unstable.nixosModule - nix-index-db-unstable.nixosModules.nix-index - ./roles/common - ./roles/desktop - ./roles/kde - ./roles/gaming - ./roles/school - ./machines/Archie - ]; + agenix = { + url = "github:ryantm/agenix"; + inputs = { + nixpkgs.follows = "nixpkgs"; + darwin.follows = ""; # Not using this on MacOS, so this doesn't pull it's dependencies + }; }; - SurfaceGo = nixpkgs-unstable.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { systemPkgs = inputs.nixpkgs-unstable; flakeSelf = self; }; - modules = [ - agenix.nixosModules.default - home-manager-unstable.nixosModule - nixos-hardware.nixosModules.microsoft-surface-go - nix-index-db-unstable.nixosModules.nix-index - ./roles/common - ./roles/desktop - ./roles/kde - ./machines/SurfaceGo - ]; + home-manager = { + url = "github:nix-community/home-manager/release-23.05"; + inputs.nixpkgs.follows = "nixpkgs"; }; - SteamDeck = nixpkgs-unstable.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { systemPkgs = inputs.nixpkgs-unstable; flakeSelf = self; }; - modules = [ - agenix.nixosModules.default - jovian.nixosModules.default - home-manager-unstable.nixosModule - nix-index-db-unstable.nixosModules.nix-index - ./roles/common - ./roles/desktop - ./roles/kde - ./roles/gaming - ./roles/school - ./machines/SteamDeck - ]; + home-manager-unstable = { + url = "github:nix-community/home-manager/"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + + jovian = { + url = "github:Jovian-Experiments/Jovian-NixOS"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; }; - Everest = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { systemPkgs = inputs.nixpkgs; flakeSelf = self; }; - modules = [ - agenix.nixosModules.default - home-manager.nixosModule - nix-index-db.nixosModules.nix-index - ./roles/common - ./roles/server - ./machines/Everest - ]; + nix-impermanence.url = "github:nix-community/impermanence"; + + /* + These are the same input, just following different nixpkgs versions + This avoids some wierdness when using one that follows unstable on a stable nixpkgs + */ + nix-index-db = { + url = "github:Mic92/nix-index-database"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + nix-index-db-unstable = { + url = "github:Mic92/nix-index-database"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + + plasma-manager = { + url = "github:pjones/plasma-manager"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + inputs.home-manager.follows = "home-manager-unstable"; + }; + + catppuccin-vsc = { + url = "github:catppuccin/vscode"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + + vscode-extensions = { + url = "github:nix-community/nix-vscode-extensions"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + }; + + outputs = { ... } @inputs: with inputs; { + + devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell { + name = "Environment for toast's nixos configurations"; + # The agenix cli is not needed to activate a configuration, so instead of installing it + # I'll just add it to de devShell, since that's the only real time I'm going to use it. + packages = with nixpkgs.legacyPackages.x86_64-linux; [ + agenix.packages.x86_64-linux.default + git + plasma5Packages.plasma-sdk + nix-diff + ]; + shellHook ='' + export PS1="$PS1(toast-configs)> " + ''; + }; + packages = { + x86_64-linux = with import nixpkgs-unstable { system = "x86_64-linux"; }; { + pseint = callPackage ./pkgs/pseint.nix {}; + anything-sync-daemon = callPackage ./pkgs/anything-sync-daemon {}; + discord-krisp-fixer = callPackage ./pkgs/discord-krisp-fixer {}; + }; + }; + nixosConfigurations = { + Archie = nixpkgs-unstable.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { systemPkgs = inputs.nixpkgs-unstable; flakeSelf = self; }; + /* + I used to set up nixpkgs in the flake, but doing that made + defining overlays in modules impossible (or at least I could + not figure out how) + Also has nice side effect of making it easier to add new systems :3 + */ + modules = [ + agenix.nixosModules.default + home-manager-unstable.nixosModule + nix-index-db-unstable.nixosModules.nix-index + ./roles/common + ./roles/desktop + ./roles/kde + ./roles/gaming + ./roles/school + ./machines/Archie + ]; + }; + + SurfaceGo = nixpkgs-unstable.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { systemPkgs = inputs.nixpkgs-unstable; flakeSelf = self; }; + modules = [ + agenix.nixosModules.default + home-manager-unstable.nixosModule + nixos-hardware.nixosModules.microsoft-surface-go + nix-index-db-unstable.nixosModules.nix-index + ./roles/common + ./roles/desktop + ./roles/kde + ./machines/SurfaceGo + ]; + }; + + SteamDeck = nixpkgs-unstable.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { systemPkgs = inputs.nixpkgs-unstable; flakeSelf = self; }; + modules = [ + agenix.nixosModules.default + jovian.nixosModules.default + home-manager-unstable.nixosModule + nix-index-db-unstable.nixosModules.nix-index + ./roles/common + ./roles/desktop + ./roles/kde + ./roles/gaming + ./roles/school + ./machines/SteamDeck + ]; + }; + + Everest = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { systemPkgs = inputs.nixpkgs; flakeSelf = self; }; + modules = [ + agenix.nixosModules.default + home-manager.nixosModule + nix-index-db.nixosModules.nix-index + ./roles/common + ./roles/server + ./machines/Everest + ]; + }; }; }; -}; }