diff --git a/configs/cloud.nix b/configs/cloud.nix index e7b958a..9878a58 100644 --- a/configs/cloud.nix +++ b/configs/cloud.nix @@ -1,12 +1,4 @@ { config, lib, pkgs, ... }: { - imports = [ - - ]; - - niveum = { - dropbox.enable = false; - }; - system.activationScripts.home-symlinks = '' ln -sfn ${config.users.users.me.home}/cloud/syncthing/common/mahlzeit ${config.users.users.me.home}/mahlzeit ln -sfn ${config.users.users.me.home}/cloud/Seafile/Wiki ${config.users.users.me.home}/notes @@ -46,7 +38,7 @@ dataDir = "/home/kfm/.config/syncthing"; cert = toString ; key = toString ; - inherit ((import ).syncthing) devices; + inherit ((import ../lib).syncthing) devices; folders = let cloud-dir = "${config.users.users.me.home}/cloud"; in { diff --git a/configs/default.nix b/configs/default.nix index c9da785..de1f807 100644 --- a/configs/default.nix +++ b/configs/default.nix @@ -1,11 +1,10 @@ { pkgs, lib, config, options, ... }: let inherit (lib.strings) makeBinPath; - inherit (import ) localAddresses kieran; + inherit (import ../lib) localAddresses kieran; in { imports = [ - - + ../modules/system-dependent.nix { boot.supportedFilesystems = [ "ntfs" ]; } @@ -28,10 +27,8 @@ in { }; }; overlays = [ - (import ) - (import ) (self: super: { - scripts = import { pkgs = super; lib = super.lib; }; + scripts = import ../packages/scripts { pkgs = super; lib = super.lib; }; }) ]; }; @@ -203,13 +200,11 @@ in { ./ccc.nix # ./kleiter.nix ./khal.nix - ./engiadina.nix ./chromium.nix ./cloud.nix ./copyq.nix ./compton.nix ./direnv.nix - ./distrobump.nix ./docker.nix ./dunst.nix ./flix.nix @@ -228,14 +223,13 @@ in { ./nano.nix ./neovim.nix ./neomutt.nix - ./nix.nix ./newsboat.nix ./flameshot-once.nix ./packages - ./power-action.nix + # ./power-action.nix ./printing.nix ./openweathermap.nix - ./wallpaper.nix + # ./wallpaper.nix ./redshift.nix ./retiolum.nix ./rofi.nix diff --git a/configs/distrobump.nix b/configs/distrobump.nix deleted file mode 100644 index 2cab5de..0000000 --- a/configs/distrobump.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ lib, config, pkgs, ... }: { - imports = [ - (import { - inherit lib config; - pkgs = pkgs // { writeDash = pkgs.writers.writeDash; }; - }) - ]; - - makefu.distrobump.enable = false; -} diff --git a/configs/dunst.nix b/configs/dunst.nix index 040b7fe..5e18100 100644 --- a/configs/dunst.nix +++ b/configs/dunst.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: let - inherit (import ) defaultApplications colours theme; + inherit (import ../lib) defaultApplications colours theme; in { home-manager.users.me.services.dunst = { enable = true; diff --git a/configs/engiadina.nix b/configs/engiadina.nix deleted file mode 100644 index 793d50b..0000000 --- a/configs/engiadina.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ config, pkgs, ... }: -let - inherit (import ) tmpfilesConfig; - cdnRoot = "/var/lib/engiadina"; -in -{ - imports = [ ]; - - krebs.permown.${cdnRoot} = { - owner = config.users.users.me.name; - group = "users"; - umask = "0002"; - }; - - services.nginx = { - enable = true; - virtualHosts.default = { - root = cdnRoot; - listen = [{ - addr = "0.0.0.0"; - port = 3333; - }]; - }; - }; - - environment.shellAliases = { - engiadina-watch = "${pkgs.findutils}/bin/find extra-src src | ${pkgs.entr}/bin/entr -s 'build-component && ${pkgs.rsync}/bin/rsync -avu dist/*.js ${cdnRoot}/'"; - engiadina-edit = "$EDITOR ${cdnRoot}/index.html"; - }; -} diff --git a/configs/git.nix b/configs/git.nix index fe75cd8..ebd328d 100644 --- a/configs/git.nix +++ b/configs/git.nix @@ -1,6 +1,6 @@ { pkgs, config, lib, ... }: let - inherit (import ) kieran ignorePaths; + inherit (import ../lib) kieran ignorePaths; in { environment.systemPackages = [ diff --git a/configs/hledger.nix b/configs/hledger.nix index cebce5f..78b5409 100644 --- a/configs/hledger.nix +++ b/configs/hledger.nix @@ -1,5 +1,5 @@ { config, pkgs, ... }: { - imports = [ ]; + imports = [ ../modules/hledger.nix ]; niveum.hledger = { enable = true; diff --git a/configs/i3.nix b/configs/i3.nix index a3b918e..0af7705 100644 --- a/configs/i3.nix +++ b/configs/i3.nix @@ -1,7 +1,7 @@ -{ config, pkgs, lib, ... }: +{ inputs, config, pkgs, lib, ... }: let - inherit (import ) defaultApplications colours; - klem = import { + inherit (import ../lib) defaultApplications colours; + klem = import ../packages/scripts/klem.nix { inherit pkgs lib; config.scripts = { "p.r" = pkgs.writers.writeDash "p.r" '' @@ -146,7 +146,7 @@ in { }; }; statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${ - (pkgs.formats.toml {}).generate "i3status-rust.toml" (import { + (pkgs.formats.toml {}).generate "i3status-rust.toml" (import ../lib/i3status-rust.nix { inherit (config.niveum) batteryName wirelessInterface; inherit colours; inherit pkgs; diff --git a/configs/mpv.nix b/configs/mpv.nix index c9006a1..058e524 100644 --- a/configs/mpv.nix +++ b/configs/mpv.nix @@ -1,6 +1,5 @@ { pkgs, lib, ... }: let swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}"; - nixpkgs-unstable = import { config.allowUnfree = true; }; in { environment.shellAliases.smpv = swallow "mpv"; @@ -22,7 +21,7 @@ in { "Alt+j" = "add video-pan-y -0.05"; }; scripts = [ - nixpkgs-unstable.mpvScripts.youtube-quality + pkgs.unstable.mpvScripts.youtube-quality ]; }; }; diff --git a/configs/networkmanager.nix b/configs/networkmanager.nix index 0145096..19348f1 100644 --- a/configs/networkmanager.nix +++ b/configs/networkmanager.nix @@ -1,6 +1,5 @@ { lib, pkgs, ... }: let - autowifi = pkgs.writers.writePython3Bin "autowifi" { flakeIgnore = [ "E501" ]; } ; profile = name: custom: lib.recursiveUpdate { connection.id = name; connection.type = "wifi"; @@ -39,7 +38,7 @@ let }; in { - imports = [ ]; + imports = [ ../modules/networkmanager-declarative.nix ]; networking.networkmanager = { enable = true; @@ -83,18 +82,5 @@ in users.users.me.extraGroups = [ "networkmanager" ]; - systemd.services.autowifi = { - enable = false; - description = "Automatic wifi connector"; - wantedBy = [ "multi-user.target" ]; - path = [ pkgs.networkmanager ]; - serviceConfig = { - Type = "simple"; - Restart = "always"; - RestartSec = "10s"; - ExecStart = "${autowifi}/bin/autowifi"; - }; - }; - environment.systemPackages = [ pkgs.speedtest-cli ]; } diff --git a/configs/nix.nix b/configs/nix.nix deleted file mode 100644 index dc8a092..0000000 --- a/configs/nix.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ pkgs, ... }: -{ - # enable `nix flake` - nix = { - package = pkgs.nixFlakes; - extraOptions = "experimental-features = nix-command flakes"; - }; -} diff --git a/configs/printing.nix b/configs/printing.nix index ac773d5..1e6d98d 100644 --- a/configs/printing.nix +++ b/configs/printing.nix @@ -1,6 +1,6 @@ { pkgs, ... }: let - inherit (import ) localAddresses; + inherit (import ../lib) localAddresses; hp-driver = pkgs.hplipWithPlugin; in { services.printing = { diff --git a/configs/retiolum.nix b/configs/retiolum.nix index 9f3f5b2..bccc062 100644 --- a/configs/retiolum.nix +++ b/configs/retiolum.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: { imports = [ - + ../modules/retiolum.nix ]; networking.hosts = { "42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ]; }; diff --git a/configs/ssh.nix b/configs/ssh.nix index 245d0dd..7ae50a1 100644 --- a/configs/ssh.nix +++ b/configs/ssh.nix @@ -1,6 +1,6 @@ { pkgs, config, lib, ... }: let - inherit (import ) sshPort kieran; + inherit (import ../lib) sshPort kieran; in { services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add"; diff --git a/configs/sshd.nix b/configs/sshd.nix index 32730e2..d6e6450 100644 --- a/configs/sshd.nix +++ b/configs/sshd.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - inherit (import ) sshPort kieran; + inherit (import ../lib) sshPort kieran; in { users.motd = "Welcome to ${config.networking.hostName}!"; diff --git a/configs/theming.nix b/configs/theming.nix index 55ff483..b66fc0e 100644 --- a/configs/theming.nix +++ b/configs/theming.nix @@ -1,6 +1,6 @@ { lib, config, pkgs, ... }: let - theme = (import ).theme pkgs; + theme = (import ../lib).theme pkgs; in { environment.systemPackages = [ theme.gtk.package theme.icon.package theme.cursor.package ]; diff --git a/configs/traadfri.nix b/configs/traadfri.nix index e531896..622b0df 100644 --- a/configs/traadfri.nix +++ b/configs/traadfri.nix @@ -4,7 +4,7 @@ let living-room-id = 131090; in { - imports = [ ]; + imports = [ ../modules/traadfri.nix ]; environment.systemPackages = [ (pkgs.writers.writeDashBin "traadfri-party" '' diff --git a/deploy.nix b/deploy.nix index e4dcbab..d2a7e0a 100644 --- a/deploy.nix +++ b/deploy.nix @@ -1,68 +1,40 @@ +{ pkgs, secrets, writeCommand, lib, nixosRebuildCommand ? "switch" }: let - inherit (import ./lib/default.nix) sshPort; + sshPort = 22022; - gitFromJson = path: - let object = importJson path; - in { - inherit (object) url; - ref = object.rev; + # command that ensures we use flake.nix during switch + command = targetPath: + let + commandLine = "TMPDIR=/tmp nixos-rebuild ${nixosRebuildCommand} --flake ${targetPath} -L --keep-going"; + in + '' + echo '${commandLine}' + nix-shell \ + -E "with import {}; mkShell { buildInputs = [ git (nixos { nix.package = nixFlakes; }).nixos-rebuild ]; }" \ + --run '${commandLine}' + ''; + + source = name: { + niveum.file = toString ./.; + system-secrets.pass = { + dir = secrets; + name = "systems/${name}"; + }; + secrets.pass = { + dir = secrets; + name = "shared"; }; - krops = builtins.fetchGit (gitFromJson .versions/krops.json); - lib = import "${krops}/lib"; - pkgs = import "${krops}/pkgs" { }; - importJson = (import { }).lib.importJSON; - - regularSystem = { path, name, address }: { - source = lib.evalSource [{ - niveum.file = toString ./.; - system.file = toString path; - nixos-config.symlink = "system/configuration.nix"; - - nixpkgs.git = gitFromJson .versions/nixpkgs.json // { shallow = true; }; - nixpkgs-unstable.git = gitFromJson .versions/nixpkgs-unstable.json // { shallow = true; }; - home-manager.git = gitFromJson .versions/home-manager.json; - stockholm.git = gitFromJson .versions/stockholm.json; - nix-writers.git = gitFromJson .versions/nix-writers.json; - retiolum.git = gitFromJson .versions/retiolum.json; - nixpkgs-mozilla.git = gitFromJson .versions/nixpkgs-mozilla.json; - system-secrets.pass = { - dir = toString ~/.password-store; - name = "systems/${name}"; - }; - secrets.pass = { - dir = toString ~/.password-store; - name = "shared"; - }; - }]; - target = "root@${address}:${toString sshPort}"; }; - inherit (pkgs.krops) writeDeploy; + + deploy = {name, host}: writeCommand "/bin/system" { + source = lib.evalSource [ (source name) ]; + force = true; + target = lib.mkTarget "root@${host}:${toString sshPort}/var/krops/niveum"; + inherit command; + }; in { - zaatar = writeDeploy "deploy-zaatar" (regularSystem { - path = systems/zaatar; - name = "zaatar"; - address = "zaatar.r"; - }); - kabsa = writeDeploy "deploy-kabsa" (regularSystem { - path = systems/kabsa; - name = "kabsa"; - address = "kabsa.r"; - }); - toum = writeDeploy "deploy-toum" (regularSystem { - path = systems/toum; - name = "toum"; - address = "toum.r"; - }) // { - buildTarget = "${builtins.getEnv "USER"}@localhost/${builtins.getEnv "HOME"}/.cache/krops"; - }; - makanek = writeDeploy "deploy-makanek" (regularSystem { - path = systems/makanek; - name = "makanek"; - address = "makanek.r"; - }); - manakish = writeDeploy "deploy-manakish" (regularSystem { - path = systems/manakish; - name = "manakish"; - address = "manakish.r"; - }); + zaatar = deploy { name = "zaatar"; host = "zaatar.r"; }; + kabsa = deploy { name = "kabsa"; host = "kabsa.r"; }; + manakish = deploy { name = "manakish"; host = "manakish.r"; }; + makanek = deploy { name = "makanek"; host = "makanek.r"; }; } diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..479632d --- /dev/null +++ b/flake.lock @@ -0,0 +1,174 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1639871969, + "narHash": "sha256-6feWUnMygRzA9tzkrfAzpA5/NBYg75bkFxnqb1DtD7E=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "697cc8c68ed6a606296efbbe9614c32537078756", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-21.11", + "repo": "home-manager", + "type": "github" + } + }, + "krops": { + "inputs": { + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1632420452, + "narHash": "sha256-ncK6vABW/Ku9XI0kqj1otarUfblryoQzSaOCnaZ0oSs=", + "owner": "Mic92", + "repo": "krops", + "rev": "0388970c568905fedcbf429e5745aacd4f7a6633", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "krops", + "type": "github" + } + }, + "nix-writers": { + "flake": false, + "locked": { + "lastModified": 1554228333, + "narHash": "sha256-hG/PlcCvCQhNcU55NpHfATkyH9k6cZmO7uvBoJjasXU=", + "ref": "master", + "rev": "c528cf970e292790b414b4c1c8c8e9d7e73b2a71", + "revCount": 32, + "type": "git", + "url": "https://cgit.krebsco.de/nix-writers" + }, + "original": { + "type": "git", + "url": "https://cgit.krebsco.de/nix-writers" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1640759603, + "narHash": "sha256-k4d7oC6GvDV1OKxG325JUDpKtZcDUPEiddnJMOQQ/x8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e101dc111ac1e5a21efca7822417acc1cb92013a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "release-21.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1640540585, + "narHash": "sha256-cCmknKFjWgam9jq+58wSd0Z4REia8mjBP65kXcL3ki8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ac169ec6371f0d835542db654a65e0f2feb07838", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "retiolum": { + "flake": false, + "locked": { + "lastModified": 1640734423, + "narHash": "sha256-i/M1nyPnIEqV7K5dn0Q7V5mRtfzspH+AM6HbgPYGreI=", + "owner": "krebs", + "repo": "retiolum", + "rev": "0e11e0119f330ea103a44e3502149ae50c1a299d", + "type": "github" + }, + "original": { + "owner": "krebs", + "repo": "retiolum", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "home-manager": "home-manager", + "krops": "krops", + "nix-writers": "nix-writers", + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable", + "retiolum": "retiolum", + "secrets": "secrets", + "stockholm": "stockholm" + } + }, + "secrets": { + "flake": false, + "locked": { + "lastModified": 1640701876, + "narHash": "sha256-2vQ32k/z0Jh+Ade32mRA6tENetvWI6SNNrR5DJiBuWw=", + "ref": "master", + "rev": "120635422c7fb78c94e6a182fc384c98fb5cf4ce", + "revCount": 170, + "type": "git", + "url": "file:///home/kfm/projects/sphinx" + }, + "original": { + "type": "git", + "url": "file:///home/kfm/projects/sphinx" + } + }, + "stockholm": { + "flake": false, + "locked": { + "lastModified": 1640733142, + "narHash": "sha256-HzSEyYTGPoGAfgl+lZLb/DDUCQRoZ2iN7oTLhl+1KTQ=", + "ref": "master", + "rev": "687948cfe5154e03f93886dd27dc30c7910ba754", + "revCount": 10222, + "type": "git", + "url": "https://cgit.krebsco.de/stockholm" + }, + "original": { + "type": "git", + "url": "https://cgit.krebsco.de/stockholm" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..370e062 --- /dev/null +++ b/flake.nix @@ -0,0 +1,99 @@ +{ + description = "niveum systems"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/release-21.11"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + + secrets = { + url = "/home/kfm/.password-store"; + flake = false; + }; + + flake-utils = { + url = "github:numtide/flake-utils"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + home-manager = { + url = "github:nix-community/home-manager/release-21.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + retiolum = { + url = "github:krebs/retiolum"; + flake = false; + }; + nix-writers = { + url = "git+https://cgit.krebsco.de/nix-writers"; + flake = false; + }; + stockholm = { + url = "git+https://cgit.krebsco.de/stockholm"; + flake = false; + }; + krops = { + url = "github:Mic92/krops"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-utils.follows = "flake-utils"; + }; + }; + + outputs = { self, nixpkgs, stockholm, secrets, nixpkgs-unstable, home-manager, retiolum, krops, nix-writers, ... }@inputs: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + writeCommand = krops.packages.${system}.writeCommand; + niveumSystem = configuration: nixpkgs.lib.nixosSystem { + inherit system; + modules = defaultModules ++ [ configuration ]; + }; + defaultModules = [ + { _module.args.inputs = inputs; } + ({ pkgs, ... }: { + nix = { + nixPath = [ "nixpkgs=${pkgs.path}" ]; + package = pkgs.nixFlakes; + extraOptions = '' + experimental-features = nix-command flakes + ''; + }; + nixpkgs.overlays = [ + (_self: _super: { + unstable = nixpkgs-unstable.legacyPackages.${pkgs.system}; + }) + (import "${nix-writers}/pkgs") + # (import ) + ]; + }) + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + } + ]; + in + { + nixosConfigurations = { + kabsa = niveumSystem systems/kabsa/configuration.nix; + makanek = niveumSystem systems/makanek/configuration.nix; + manakish = niveumSystem systems/manakish/configuration.nix; + zaatar = niveumSystem systems/zaatar/configuration.nix; + }; + + apps.${system} = { + # nix run ".#deploy.kabsa" + deploy = pkgs.callPackage ./deploy.nix { + inherit secrets writeCommand; + inherit (krops) lib; + }; + + # nix run ".#test.kabsa" + test = pkgs.callPackage ./deploy.nix { + inherit secrets writeCommand; + inherit (krops) lib; + nixosRebuildCommand = "test"; + }; + }; + }; +} diff --git a/modules/default.nix b/modules/default.nix index 91edbbd..fe79318 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,7 +1,6 @@ { imports = [ ./constants.nix - ./dropbox.nix ./retiolum.nix ]; } diff --git a/modules/dropbox.nix b/modules/dropbox.nix deleted file mode 100644 index 7f7bf4f..0000000 --- a/modules/dropbox.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ pkgs, lib, config, ... }: -with lib; -let cfg = config.niveum.dropbox; -in { - options.niveum.dropbox = { enable = mkEnableOption "Dropbox"; }; - - config = mkIf cfg.enable { - environment.systemPackages = [ pkgs.dropbox-cli ]; - - networking.firewall = { - allowedTCPPorts = [ 17500 ]; - allowedUDPPorts = [ 17500 ]; - }; - - systemd.user.services.dropbox = { - description = "Dropbox synchronisation service"; - wantedBy = [ "graphical-session.target" ]; - serviceConfig = { - ExecStart = "${pkgs.dropbox.out}/bin/dropbox"; - ExecReload = "${pkgs.coreutils.out}/bin/kill -HUP $MAINPID"; - KillMode = "control-group"; # upstream recommends process - Restart = "on-failure"; - PrivateTmp = true; - ProtectSystem = "full"; - Nice = 10; - }; - }; - }; -} diff --git a/modules/retiolum.nix b/modules/retiolum.nix index de5a1f4..99250df 100644 --- a/modules/retiolum.nix +++ b/modules/retiolum.nix @@ -1,8 +1,9 @@ -{ config, pkgs, lib, ... }: +{ inputs, config, pkgs, lib, ... }: with lib; let netname = "retiolum"; cfg = config.networking.retiolum; + inherit (inputs) retiolum; in { options = { networking.retiolum.ipv4 = mkOption { @@ -31,8 +32,8 @@ in { services.tinc.networks.${netname} = { name = cfg.nodename; hosts = builtins.mapAttrs - (name: _: builtins.readFile "${}/${name}") - (builtins.readDir ); + (name: _: builtins.readFile "${retiolum}/hosts/${name}") + (builtins.readDir "${retiolum}/hosts"); rsaPrivateKeyFile = toString ; ed25519PrivateKeyFile = toString ; extraConfig = '' @@ -41,7 +42,7 @@ in { ''; }; - networking.extraHosts = builtins.readFile (toString ); + networking.extraHosts = builtins.readFile (toString "${retiolum}/etc.hosts"); environment.systemPackages = [ config.services.tinc.networks.${netname}.package ]; diff --git a/systems/kabsa/configuration.nix b/systems/kabsa/configuration.nix index 42dc0cf..a6f4362 100644 --- a/systems/kabsa/configuration.nix +++ b/systems/kabsa/configuration.nix @@ -1,13 +1,13 @@ { config, pkgs, lib, ... }: let nixpkgs-unstable = import { config.allowUnfree = true; }; - inherit (import ) retiolumAddresses; + inherit (import ../../lib) retiolumAddresses; in { imports = [ - - - + ../../configs/default.nix + ../../configs/battery.nix + ../../configs/networkmanager.nix ./hardware-configuration.nix # ]; diff --git a/systems/kabsa/hardware-configuration.nix b/systems/kabsa/hardware-configuration.nix index 81b9f36..520e60d 100644 --- a/systems/kabsa/hardware-configuration.nix +++ b/systems/kabsa/hardware-configuration.nix @@ -1,5 +1,5 @@ -{ config, lib, pkgs, ... }: { - imports = [ ]; +{ config, lib, pkgs, modulesPath, ... }: { + imports = [ "${modulesPath}/installer/scan/not-detected.nix" ]; boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ]; boot.initrd.kernelModules = [ ];