Make config host independant
This commit is contained in:
parent
d0317d9b39
commit
dc30940074
8 changed files with 67 additions and 20 deletions
45
flake.lock
generated
45
flake.lock
generated
|
@ -1,12 +1,32 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"disko": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1716126753,
|
||||||
|
"narHash": "sha256-fdodsQ2AWreGj4arHk6cKcnqlWrNiLb64eRrHtMZ5cw=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "disko",
|
||||||
|
"rev": "601be8412d2ab72f752448766fe0fb2f00d5c40c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "disko",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"hardware": {
|
"hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715148395,
|
"lastModified": 1716141623,
|
||||||
"narHash": "sha256-lRxjTxY3103LGMjWdVqntKZHhlmMX12QUjeFrQMmGaE=",
|
"narHash": "sha256-4NEvf7sULDyYoXIgeXHWGe7mXlr7+UL7TvgDkMqpbPY=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "a4e2b7909fc1bdf30c30ef21d388fde0b5cdde4a",
|
"rev": "f0cf56878046c42ec2096a2ade89203e7348917b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -22,11 +42,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715486357,
|
"lastModified": 1715930644,
|
||||||
"narHash": "sha256-4pRuzsHZOW5W4CsXI9uhKtiJeQSUoe1d2M9mWU98HC4=",
|
"narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "44677a1c96810a8e8c4ffaeaad10c842402647c1",
|
"rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -37,11 +57,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715447595,
|
"lastModified": 1715961556,
|
||||||
"narHash": "sha256-VsVAUQOj/cS1LCOmMjAGeRksXIAdPnFIjCQ0XLkCsT0=",
|
"narHash": "sha256-+NpbZRCRisUHKQJZF3CT+xn14ZZQO+KjxIIanH3Pvn4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "062ca2a9370a27a35c524dc82d540e6e9824b652",
|
"rev": "4a6b83b05df1a8bd7d99095ec4b4d271f2956b64",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -53,11 +73,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715395895,
|
"lastModified": 1716061101,
|
||||||
"narHash": "sha256-DreMqi6+qa21ffLQqhMQL2XRUkAGt3N7iVB5FhJKie4=",
|
"narHash": "sha256-H0eCta7ahEgloGIwE/ihkyGstOGu+kQwAiHvwVoXaA0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "71bae31b7dbc335528ca7e96f479ec93462323ff",
|
"rev": "e7cc61784ddf51c81487637b3031a6dd2d6673a2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -69,6 +89,7 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"disko": "disko",
|
||||||
"hardware": "hardware",
|
"hardware": "hardware",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
|
|
21
flake.nix
21
flake.nix
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, ... }@inputs:
|
outputs = { self, nixpkgs, home-manager, disko, ... }@inputs:
|
||||||
let
|
let
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
forAllSystems = nixpkgs.lib.genAttrs [
|
forAllSystems = nixpkgs.lib.genAttrs [
|
||||||
|
@ -41,6 +41,7 @@
|
||||||
{
|
{
|
||||||
# Please replace my-nixos with your hostname
|
# Please replace my-nixos with your hostname
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
|
||||||
Lenni = lib.nixosSystem {
|
Lenni = lib.nixosSystem {
|
||||||
inherit specialArgs;
|
inherit specialArgs;
|
||||||
modules = [
|
modules = [
|
||||||
|
@ -51,10 +52,28 @@
|
||||||
#home-manager.users.willifan = import ./users/willifan/home;
|
#home-manager.users.willifan = import ./users/willifan/home;
|
||||||
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
|
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
|
||||||
}
|
}
|
||||||
|
disko.nixosModules.disko
|
||||||
./hosts
|
./hosts
|
||||||
./users/willifan
|
./users/willifan
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Puenktchen = lib.nixosSystem {
|
||||||
|
inherit specialArgs;
|
||||||
|
modules = [
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
#home-manager.users.willifan = import ./users/willifan/home;
|
||||||
|
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
|
||||||
|
}
|
||||||
|
disko.nixosModules.disko
|
||||||
|
./hosts
|
||||||
|
./users/willifan
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
#./disko.nix
|
./disko.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
|
@ -41,6 +41,10 @@
|
||||||
mountOptions = [ "compress=zstd" "noatime" ];
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
mountpoint = "/nix";
|
mountpoint = "/nix";
|
||||||
};
|
};
|
||||||
|
"/mnt/data" = {
|
||||||
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
|
mountpoint = "/mnt/data";
|
||||||
|
};
|
||||||
# Subvolume for the swapfile
|
# Subvolume for the swapfile
|
||||||
"/swap" = {
|
"/swap" = {
|
||||||
mountpoint = "/.swapvol";
|
mountpoint = "/.swapvol";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, configVars, ... }:
|
||||||
{
|
{
|
||||||
networking.hostName = "Lenni";
|
networking.hostName = configVars.hostname;
|
||||||
imports = [
|
imports = [
|
||||||
./nix-ld.nix
|
./nix-ld.nix
|
||||||
./boot.nix
|
./boot.nix
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, configVars, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./common
|
./common
|
||||||
./Lenni
|
./${configVars.hostname}
|
||||||
];
|
];
|
||||||
}
|
}
|
|
@ -4,6 +4,7 @@
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
background_opacity = "0.85";
|
||||||
enable_audio_bell = false;
|
enable_audio_bell = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
|
username = "willifan";
|
||||||
|
hostname = "Lenni";
|
||||||
|
email = "willifan@proton.me";
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue