diff options
| author | Petri Hienonen <petri.hienonen@gmail.com> | 2024-05-23 13:56:00 +0300 |
|---|---|---|
| committer | Petri Hienonen <petri.hienonen@gmail.com> | 2025-11-30 12:29:57 +0200 |
| commit | 08297376a85a1719518507e54fca9de954d2376a (patch) | |
| tree | 3b9c58304b40248533bbb2bb5b7bad2da9da1ff0 /flake.nix | |
| parent | 75c2af4aedd2ac5c2cfc74b346625fa4b265541d (diff) | |
| download | nixos-08297376a85a1719518507e54fca9de954d2376a.tar.zst | |
Agenix configuration
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 186 |
1 files changed, 167 insertions, 19 deletions
@@ -1,40 +1,188 @@ { description = "Petri's system"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager = { - url = "github:nix-community/home-manager/release-23.11"; + url = "github:nix-community/home-manager/release-25.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + agenix = { + url = "github:ryantm/agenix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + firefox-addons = { + url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, home-manager, nixos-hardware, ... }: - let - inherit (self) outputs; - vars = { - user = "petri"; - name = "Petri Hienonen"; - email= "petri.hienonen@gmail.com"; - location = "$HOME/.nix"; - terminal = "alacritty"; - editor = "helix"; - shell = "fish"; - }; - in { + outputs = + inputs@{ + self, + nixpkgs, + agenix, + home-manager, + nixpkgs-unstable, + nixos-hardware, + ... + }: + let + inherit (self) outputs; + vars = { + user = "petri"; + name = "Petri Hienonen"; + email = "petri.hienonen@gmail.com"; + location = "$HOME/.nix"; + terminal = "ghostty"; + editor = "nvim"; + shell = "fish"; + }; + pkgs-unstable = import nixpkgs-unstable { + system = "x86_64-linux"; + config.allowUnfree = true; + }; + in + { nixosConfigurations = { saarni = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - specialArgs = {inherit inputs outputs vars nixpkgs-unstable; }; + specialArgs = { + inherit + agenix + inputs + outputs + vars + pkgs-unstable + ; + }; modules = [ ./hosts/saarni + ./roles/shared.nix + agenix.nixosModules.default + home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + sharedModules = [ inputs.agenix.homeManagerModules.default ]; + extraSpecialArgs = { + inherit + vars + inputs + outputs + pkgs-unstable + ; + }; + users = { + petri = import ./home; + }; + }; + } + ]; + }; + pihlaja = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { + inherit + inputs + outputs + vars + pkgs-unstable + ; + }; + modules = [ + ./hosts/pihlaja + ./roles/shared.nix + agenix.nixosModules.default + home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + sharedModules = [ inputs.agenix.homeManagerModules.default ]; + extraSpecialArgs = { + inherit + vars + inputs + outputs + pkgs-unstable + ; + }; + users = { + petri = import ./home; + }; + }; + } + #{ + #nixpkgs = { + # config.cudaSupport = true; + #hostPlatform = { + # aesSupport = true; + # avx2Support = true; + # # useLLVM = true; + # gcc = { + # arch = "x86-64-v3"; + # }; + # system = "x86_64-linux"; + # linker = "mold"; + # libc = "glibc"; + #}; + #}; + #} + ]; + }; + kataja = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { + inherit + inputs + outputs + vars + pkgs-unstable + ; + }; + modules = [ + ./hosts/kataja + ./roles/shared.nix + agenix.nixosModules.default + home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + sharedModules = [ inputs.agenix.homeManagerModules.default ]; + extraSpecialArgs = { + inherit + inputs + outputs + vars + pkgs-unstable + ; + }; + users = { + petri = import ./home; + }; + }; + } + { + nixpkgs = { + config.rocmSupport = true; + #hostPlatform = { + # aesSupport = true; + # avx2Support = true; + # # useLLVM = true; + # gcc = { + # arch = "x86-64-v3"; + # }; + # system = "x86_64-linux"; + # linker = "mold"; + # libc = "glibc"; + #}; + }; } ]; }; }; }; } - |
