Reorganize configuration and prep for flakes
This commit is contained in:
parent
78439054dd
commit
dea7fcbf96
19 changed files with 250 additions and 95 deletions
165
flake.lock
generated
165
flake.lock
generated
|
@ -1,24 +1,183 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1743550720,
|
||||||
|
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ixx": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"nixvim",
|
||||||
|
"nuschtosSearch",
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nuschtosSearch",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1748294338,
|
||||||
|
"narHash": "sha256-FVO01jdmUNArzBS7NmaktLdGA5qA3lUMJ4B7a05Iynw=",
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "ixx",
|
||||||
|
"rev": "cc5f390f7caf265461d4aab37e98d2292ebbdb85",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"ref": "v0.0.8",
|
||||||
|
"repo": "ixx",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748437600,
|
"lastModified": 1748437600,
|
||||||
"narHash": "sha256-hYKMs3ilp09anGO7xzfGs3JqEgUqFMnZ8GMAqI6/k04=",
|
"narHash": "sha256-hYKMs3ilp09anGO7xzfGs3JqEgUqFMnZ8GMAqI6/k04=",
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "7282cb574e0607e65224d33be8241eae7cfe0979",
|
"rev": "7282cb574e0607e65224d33be8241eae7cfe0979",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-25.05",
|
"ref": "nixos-25.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1748437600,
|
||||||
|
"narHash": "sha256-hYKMs3ilp09anGO7xzfGs3JqEgUqFMnZ8GMAqI6/k04=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "7282cb574e0607e65224d33be8241eae7cfe0979",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-25.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixvim": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"nuschtosSearch": "nuschtosSearch",
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1748695667,
|
||||||
|
"narHash": "sha256-oztcrhUwXAqPRBqyh9yJo6Ymiu4T94MdPARa/fTw75I=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"rev": "82fafc9f9f89b54e13cff3c51582b6c228ec8331",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "nixos-25.05",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nuschtosSearch": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"ixx": "ixx",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1748298102,
|
||||||
|
"narHash": "sha256-PP11GVwUt7F4ZZi5A5+99isuq39C59CKc5u5yVisU/U=",
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"rev": "f8a1c221afb8b4c642ed11ac5ee6746b0fe1d32f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixvim": "nixvim"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
18
flake.nix
18
flake.nix
|
@ -2,25 +2,31 @@
|
||||||
description = "All system configurations for Vili Sinervä";
|
description = "All system configurations for Vili Sinervä";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.05";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||||
|
nixvim.url = "github:nix-community/nixvim/nixos-25.05";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
inputs@{ nixpkgs, ... }:
|
{ nixpkgs, nixvim, ... }:
|
||||||
{
|
{
|
||||||
nixosConfigurations = (
|
nixosConfigurations = (
|
||||||
let
|
let
|
||||||
hosts = map (name: (nixpkgs.lib.removeSuffix ".nix" name)) (
|
hosts = builtins.attrNames (builtins.readDir ./hosts);
|
||||||
builtins.attrNames (builtins.readDir ./hosts)
|
|
||||||
);
|
|
||||||
in
|
in
|
||||||
builtins.listToAttrs (
|
builtins.listToAttrs (
|
||||||
map (
|
map (
|
||||||
host:
|
host:
|
||||||
nixpkgs.lib.nameValuePair host (
|
nixpkgs.lib.nameValuePair host (
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {
|
||||||
|
inherit nixpkgs;
|
||||||
|
inherit nixvim;
|
||||||
|
};
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [ ./hosts/${host}.nix ];
|
modules = [
|
||||||
|
./hosts/${host}/configuration.nix
|
||||||
|
./hosts/${host}/hardware-configuration.nix
|
||||||
|
];
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
) hosts
|
) hosts
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{ pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
networking.hostName = "cert-store";
|
networking.hostName = "cert-store";
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
../shared/base.nix
|
../../shared/base.nix
|
||||||
../servers/acme-cert-store.nix
|
../../servers/acme-cert-store.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
services.qemuGuest.enable = true;
|
services.qemuGuest.enable = true;
|
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [ ../shared/base.nix ];
|
imports = [ ../../shared/base.nix ];
|
||||||
|
|
||||||
# Networking conf including WireGuard
|
# Networking conf including WireGuard
|
||||||
networking = {
|
networking = {
|
|
@ -3,12 +3,12 @@
|
||||||
networking.hostName = "gaming";
|
networking.hostName = "gaming";
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
../shared/base.nix
|
../../shared/base.nix
|
||||||
../shared/hardware/nvidia.nix
|
../../shared/hardware/nvidia.nix
|
||||||
|
|
||||||
../personal/desktop.nix
|
../../personal/desktop.nix
|
||||||
|
|
||||||
../servers/gaming-server.nix
|
../../servers/gaming-server.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users.vili.hashedPasswordFile = lib.mkForce null;
|
users.users.vili.hashedPasswordFile = lib.mkForce null;
|
|
@ -46,27 +46,27 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
../shared/base.nix
|
../../shared/base.nix
|
||||||
|
|
||||||
../personal/desktop.nix
|
../../personal/desktop.nix
|
||||||
../personal/development.nix
|
../../personal/development.nix
|
||||||
|
|
||||||
../personal/hardware/amd-laptop.nix
|
../../personal/hardware/amd-laptop.nix
|
||||||
../personal/hardware/hibernate.nix
|
../../personal/hardware/hibernate.nix
|
||||||
../personal/hardware/keychron-q11.nix
|
../../personal/hardware/keychron-q11.nix
|
||||||
../personal/hardware/onlykey.nix
|
../../personal/hardware/onlykey.nix
|
||||||
../personal/hardware/trackball.nix
|
../../personal/hardware/trackball.nix
|
||||||
|
|
||||||
../personal/networking/home-wg.nix
|
../../personal/networking/home-wg.nix
|
||||||
../personal/networking/printing.nix
|
../../personal/networking/printing.nix
|
||||||
|
|
||||||
../personal/programs/bitwarden.nix
|
../../personal/programs/bitwarden.nix
|
||||||
../personal/programs/communication.nix
|
../../personal/programs/communication.nix
|
||||||
../personal/programs/firefox.nix
|
../../personal/programs/firefox.nix
|
||||||
../personal/programs/i3.nix
|
../../personal/programs/i3.nix
|
||||||
../personal/programs/moonlight.nix
|
../../personal/programs/moonlight.nix
|
||||||
../personal/programs/redshift.nix
|
../../personal/programs/redshift.nix
|
||||||
../personal/programs/study.nix
|
../../personal/programs/study.nix
|
||||||
../personal/programs/usb-automount.nix
|
../../personal/programs/usb-automount.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
|
@ -5,8 +5,8 @@
|
||||||
custom.collabora_domain = "idacollab.sinerva.eu";
|
custom.collabora_domain = "idacollab.sinerva.eu";
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
../shared/base.nix
|
../../shared/base.nix
|
||||||
../servers/nextcloud.nix
|
../../servers/nextcloud.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Networking conf including WireGuard
|
# Networking conf including WireGuard
|
|
@ -1,32 +0,0 @@
|
||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
system.stateVersion = 24.05;
|
|
||||||
networking.hostName = "lithium";
|
|
||||||
|
|
||||||
custom.home_wg_suffix = "3";
|
|
||||||
system.autoUpgrade.allowReboot = lib.mkForce false;
|
|
||||||
# boot.kernelParams = [ "resume_offset=39292928" ];
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
../shared/base.nix
|
|
||||||
|
|
||||||
../personal/desktop.nix
|
|
||||||
../personal/development.nix
|
|
||||||
|
|
||||||
../personal/hardware/hibernate.nix
|
|
||||||
../personal/hardware/intel-laptop.nix
|
|
||||||
../personal/hardware/onlykey.nix
|
|
||||||
|
|
||||||
../personal/networking/home-wg.nix
|
|
||||||
../personal/networking/printing.nix
|
|
||||||
|
|
||||||
../personal/programs/bitwarden.nix
|
|
||||||
../personal/programs/communication.nix
|
|
||||||
../personal/programs/firefox.nix
|
|
||||||
../personal/programs/i3.nix
|
|
||||||
../personal/programs/moonlight.nix
|
|
||||||
../personal/programs/redshift.nix
|
|
||||||
../personal/programs/study.nix
|
|
||||||
../personal/programs/usb-automount.nix
|
|
||||||
];
|
|
||||||
}
|
|
32
hosts/lithium/configuration.nix
Normal file
32
hosts/lithium/configuration.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
system.stateVersion = 24.05;
|
||||||
|
networking.hostName = "lithium";
|
||||||
|
|
||||||
|
custom.home_wg_suffix = "3";
|
||||||
|
system.autoUpgrade.allowReboot = lib.mkForce false;
|
||||||
|
# boot.kernelParams = [ "resume_offset=39292928" ];
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
../../shared/base.nix
|
||||||
|
|
||||||
|
../../personal/desktop.nix
|
||||||
|
../../personal/development.nix
|
||||||
|
|
||||||
|
../../personal/hardware/hibernate.nix
|
||||||
|
../../personal/hardware/intel-laptop.nix
|
||||||
|
../../personal/hardware/onlykey.nix
|
||||||
|
|
||||||
|
../../personal/networking/home-wg.nix
|
||||||
|
../../personal/networking/printing.nix
|
||||||
|
|
||||||
|
../../personal/programs/bitwarden.nix
|
||||||
|
../../personal/programs/communication.nix
|
||||||
|
../../personal/programs/firefox.nix
|
||||||
|
../../personal/programs/i3.nix
|
||||||
|
../../personal/programs/moonlight.nix
|
||||||
|
../../personal/programs/redshift.nix
|
||||||
|
../../personal/programs/study.nix
|
||||||
|
../../personal/programs/usb-automount.nix
|
||||||
|
];
|
||||||
|
}
|
|
@ -4,8 +4,8 @@
|
||||||
custom.nextcloud_domain = "nextcloud.vsinerva.fi";
|
custom.nextcloud_domain = "nextcloud.vsinerva.fi";
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
../shared/base.nix
|
../../shared/base.nix
|
||||||
../servers/nextcloud.nix
|
../../servers/nextcloud.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# HARDWARE SPECIFIC
|
# HARDWARE SPECIFIC
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
networking.hostName = "nixos";
|
networking.hostName = "nixos";
|
||||||
|
|
||||||
imports = [ ../shared/base.nix ];
|
imports = [ ../../shared/base.nix ];
|
||||||
|
|
||||||
#Many installs will need this, and it won't hurt either way
|
#Many installs will need this, and it won't hurt either way
|
||||||
services.qemuGuest.enable = true;
|
services.qemuGuest.enable = true;
|
|
@ -3,8 +3,8 @@
|
||||||
networking.hostName = "siit-dc";
|
networking.hostName = "siit-dc";
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
../shared/base.nix
|
../../shared/base.nix
|
||||||
../servers/siit-dc.nix
|
../../servers/siit-dc.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# HARDWARE SPECIFIC
|
# HARDWARE SPECIFIC
|
|
@ -3,10 +3,10 @@
|
||||||
networking.hostName = "syncthing";
|
networking.hostName = "syncthing";
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
../shared/base.nix
|
../../shared/base.nix
|
||||||
../shared/users/vili.nix
|
../../shared/users/vili.nix
|
||||||
|
|
||||||
../servers/syncthing.nix
|
../../servers/syncthing.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users.vili.hashedPasswordFile = lib.mkForce null;
|
users.users.vili.hashedPasswordFile = lib.mkForce null;
|
|
@ -3,8 +3,8 @@
|
||||||
networking.hostName = "vaultwarden";
|
networking.hostName = "vaultwarden";
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
../shared/base.nix
|
../../shared/base.nix
|
||||||
../servers/vaultwarden.nix
|
../../servers/vaultwarden.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# HARDWARE SPECIFIC
|
# HARDWARE SPECIFIC
|
|
@ -8,7 +8,7 @@ let
|
||||||
ddPassFile = "/root/wg-conf/ddPassFile";
|
ddPassFile = "/root/wg-conf/ddPassFile";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ../shared/base.nix ];
|
imports = [ ../../shared/base.nix ];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
wireguard-tools
|
wireguard-tools
|
|
@ -1,8 +1,8 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./symlinked/symlinks.nix
|
./programs/symlinked/symlinks.nix
|
||||||
../shared/users/vili
|
../shared/users/vili.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
{ ... }:
|
{ nixvim, ... }:
|
||||||
let
|
|
||||||
nixvim = import (
|
|
||||||
builtins.fetchGit {
|
|
||||||
url = "https://github.com/nix-community/nixvim";
|
|
||||||
ref = "nixos-25.05";
|
|
||||||
}
|
|
||||||
);
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [ nixvim.nixosModules.nixvim ];
|
imports = [ nixvim.nixosModules.nixvim ];
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
inputs,
|
nixpkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [ /etc/nixos/hardware-configuration.nix ];
|
|
||||||
|
|
||||||
options.custom.gua_pref = lib.mkOption {
|
options.custom.gua_pref = lib.mkOption {
|
||||||
type = with lib.types; nullOr (strMatching "^[0-9a-zA-Z:]+$");
|
type = with lib.types; nullOr (strMatching "^[0-9a-zA-Z:]+$");
|
||||||
default = null;
|
default = null;
|
||||||
|
@ -148,7 +146,7 @@
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
registry = {
|
registry = {
|
||||||
nixpkgs.flake = inputs.nixpkgs;
|
nixpkgs.flake = nixpkgs;
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = [
|
experimental-features = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue