testing
This commit is contained in:
parent
35540e5ccc
commit
558669ab35
5 changed files with 107 additions and 69 deletions
48
flake.lock
generated
48
flake.lock
generated
|
|
@ -5,11 +5,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710379155,
|
"lastModified": 1711261295,
|
||||||
"narHash": "sha256-zdHEsOOnfBTO1ymL6gd9etR+iNS6HowbJM4Llqxy+Uc=",
|
"narHash": "sha256-5DUNQl9BSmLxgGLbF05G7hi/UTk9DyZq8AuEszhQA7Q=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "cc69c2340b59e290982ec7e6238471d470c839d0",
|
"rev": "5d2d3e421ade554b19b4dbb0d11a04023378a330",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -59,11 +59,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710349883,
|
"lastModified": 1711133180,
|
||||||
"narHash": "sha256-bjbdS2mC76xNJwt1d/uZa+JdHR8CCyYbF4Ey/NgOJus=",
|
"narHash": "sha256-WJOahf+6115+GMl3wUfURu8fszuNeJLv9qAWFQl3Vmo=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "2f0db7d418e781354d8a3c50e611e3b1cd413087",
|
"rev": "1c2c5e4cabba4c43504ef0f8cc3f3dfa284e2dbb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -80,11 +80,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1706981411,
|
"lastModified": 1710888565,
|
||||||
"narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=",
|
"narHash": "sha256-s9Hi4RHhc6yut4EcYD50sZWRDKsugBJHSbON8KFwoTw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "652fda4ca6dafeb090943422c34ae9145787af37",
|
"rev": "f33900124c23c4eca5831b9b5eb32ea5894375ce",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -118,11 +118,11 @@
|
||||||
"nixpkgs-regression": "nixpkgs-regression"
|
"nixpkgs-regression": "nixpkgs-regression"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710366336,
|
"lastModified": 1711387640,
|
||||||
"narHash": "sha256-eJeZ3vMbuC351B6CH4mqcpuZJ9RgtdRcxvhd7X2++Nk=",
|
"narHash": "sha256-P6Zg/xDfXZ1QiZ7Cssb66n7Dn2m4MVdFs0uOfajQaEI=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nix",
|
"repo": "nix",
|
||||||
"rev": "c152c2767a262b772c912287e1c2d85173b4781c",
|
"rev": "290072ca1e483289c65ff4da23c22b5b2ffced06",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -132,11 +132,11 @@
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710123225,
|
"lastModified": 1711352745,
|
||||||
"narHash": "sha256-j3oWlxRZxB7cFsgEntpH3rosjFHRkAo/dhX9H3OfxtY=",
|
"narHash": "sha256-luvqik+i3HTvCbXQZgB6uggvEcxI9uae0nmrgtXJ17U=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "ad2fd7b978d5e462048729a6c635c45d3d33c9ba",
|
"rev": "9a763a7acc4cfbb8603bb0231fec3eda864f81c0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -148,11 +148,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710346304,
|
"lastModified": 1710889954,
|
||||||
"narHash": "sha256-vwoyBoCovK7+vdbCYqL9MssoFQjaXtZN8sElcjUdbx8=",
|
"narHash": "sha256-Pr6F5Pmd7JnNEMHHmspZ0qVqIBVxyZ13ik1pJtm2QXk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a0906f14161a5c5792e9883117b9471f5bf6df72",
|
"rev": "7872526e9c5332274ea5932a0c3270d6e4724f3b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -230,11 +230,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710272261,
|
"lastModified": 1711163522,
|
||||||
"narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=",
|
"narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2",
|
"rev": "44d0940ea560dee511026a53f0e2e2cde489b4d4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -299,11 +299,11 @@
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1707783103,
|
"lastModified": 1711238766,
|
||||||
"narHash": "sha256-VOP1VOeXOyjn+AJfSHzVNT0l+rgm63ev9p4uTfMfYY0=",
|
"narHash": "sha256-pHTIzcmvB66Jwbkl8LtoYVP8+mRiUwT3D29onLdx+gM=",
|
||||||
"owner": "rafaelrc7",
|
"owner": "rafaelrc7",
|
||||||
"repo": "wayland-pipewire-idle-inhibit",
|
"repo": "wayland-pipewire-idle-inhibit",
|
||||||
"rev": "328da9a7ec30648666434e05cdea614c54f71b46",
|
"rev": "7737d3d2f083dd6bb37882e71b974170f858720e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
116
flake.nix
116
flake.nix
|
|
@ -30,55 +30,91 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inputs = { inherit disko home-manager nixpkgs nixos-hardware wayland-pipewire-idle-inhibit; };
|
inherit (self) outputs;
|
||||||
|
lib = nixpkgs.lib // home-manager.lib;
|
||||||
|
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
|
forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system});
|
||||||
|
pkgsFor = lib.genAttrs systems (system: import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
});
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit lib;
|
||||||
|
nixosModules = import ./modules/nixos;
|
||||||
|
homeManagerModules = import ./modules/home-manager;
|
||||||
|
templates = import ./templates;
|
||||||
|
|
||||||
genPkgs = system: import nixpkgs { inherit system; config.allowUnfree = true; };
|
overlays = import ./overlays { inherit inputs outputs; };
|
||||||
|
hydraJobs = import ./hydra.nix { inherit inputs outputs; };
|
||||||
|
|
||||||
|
# packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; });
|
||||||
|
# devShells = forEachSystem (pkgs: import ./shell.nix { inherit pkgs; });
|
||||||
|
# formatter = forEachSystem (pkgs: pkgs.nixpkgs-fmt);
|
||||||
|
|
||||||
# creates a nixos system config
|
|
||||||
nixosSystem = system: hostname: username:
|
|
||||||
let
|
|
||||||
pkgs = genPkgs system;
|
|
||||||
in
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
specialArgs = {
|
|
||||||
inherit pkgs;
|
|
||||||
# lets us use these things in modules
|
|
||||||
customArgs = { inherit system hostname username pkgs; };
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
#disko.nixosModules.disko
|
|
||||||
./hosts/${hostname}
|
|
||||||
home-manager.nixosModules.home-manager {
|
|
||||||
networking.hostName = hostname;
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
#home-manager.users.${username} = { imports = [ ./home/${username}.nix ]; };
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# clients
|
# clients
|
||||||
ace = nixosSystem "x86_64-linux" "ace" "don";
|
ace = lib.nixosSystem {
|
||||||
dragon = nixosSystem "x86_64-linux" "dragon" "don";
|
modules = [ ./hosts/ace ];
|
||||||
eve = nixosSystem "x86_64-linux" "eve" "don";
|
specialArgs = { inherit inputs outputs; };
|
||||||
loki = nixosSystem "x86_64-linux" "loki" "don";
|
};
|
||||||
pocket2 = nixosSystem "x86_64-linux" "pocket2" "don";
|
dragon = lib.nixosSystem {
|
||||||
smaug = nixosSystem "x86_64-linux" "smaug" "don";
|
modules = [ ./hosts/dragon ];
|
||||||
#t2 = nixosSystem "x86_64-linux" "t2" "don";
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
};
|
||||||
|
eve = lib.nixosSystem {
|
||||||
|
modules = [ ./hosts/eve ];
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
};
|
||||||
|
loki = lib.nixosSystem {
|
||||||
|
modules = [ ./hosts/loki ];
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
};
|
||||||
|
pocket2 = lib.nixosSystem {
|
||||||
|
modules = [ ./hosts/pocket2 ];
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
};
|
||||||
|
smaug = lib.nixosSystem {
|
||||||
|
modules = [ ./hosts/smaug ];
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
};
|
||||||
|
# t2 = lib.nixosSystem {
|
||||||
|
# modules = [ ./hosts/t2 ];
|
||||||
|
# specialArgs = { inherit inputs outputs; };
|
||||||
|
# };
|
||||||
|
|
||||||
# servers
|
# servers
|
||||||
display = nixosSystem "x86_64-linux" "display" "don";
|
display = lib.nixosSystem {
|
||||||
harper2 = nixosSystem "x86_64-linux" "harper2" "don";
|
modules = [ ./hosts/display ];
|
||||||
harper = nixosSystem "x86_64-linux" "harper" "don";
|
specialArgs = { inherit inputs outputs; };
|
||||||
nuwww = nixosSystem "x86_64-linux" "nuwww" "don";
|
};
|
||||||
pihole = nixosSystem "x86_64-linux" "pihole" "don";
|
harper2 = lib.nixosSystem {
|
||||||
www2 = nixosSystem "x86_64-linux" "www2" "don";
|
modules = [ ./hosts/harper2 ];
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
};
|
||||||
|
harper = lib.nixosSystem {
|
||||||
|
modules = [ ./hosts/harper ];
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
};
|
||||||
|
nuwww = lib.nixosSystem {
|
||||||
|
modules = [ ./hosts/nuwww ];
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
};
|
||||||
|
pihole = lib.nixosSystem {
|
||||||
|
modules = [ ./hosts/pihole ];
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
};
|
||||||
|
www2 = lib.nixosSystem {
|
||||||
|
modules = [ ./hosts/www2 ];
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
};
|
||||||
|
|
||||||
# test system
|
# test system
|
||||||
# use this for a blank ISO + disko to work
|
# use this for a blank ISO + disko to work
|
||||||
nixos = nixosSystem "x86_64-linux" "nixos" "don";
|
nixos = lib.nixosSystem {
|
||||||
|
modules = [ ./hosts/nixos ];
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
{ ... }:
|
{ inputs, outputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs outputs; };
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ inputs, config, ... }:
|
{ inputs, outputs, ... }:
|
||||||
{
|
{
|
||||||
xdg.configFile."sway/config".source = files/sway/${host};
|
# xdg.configFile."sway/config".source = files/sway/${inputs.networking.hostName};
|
||||||
# xdg.configFile."sway/config".source = files/sway/default;
|
xdg.configFile."sway/config".source = files/sway/default;
|
||||||
programs.swaylock = {
|
programs.swaylock = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ inputs, outputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue