From 7fb60a28eb6404892c315b8a222ba17930b23b66 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Sun, 10 Jan 2021 06:27:22 +0000 Subject: [PATCH] Move workstation packages into sets --- configuration.nix | 53 ++++------------------------ externals/packages/jlink/default.nix | 10 +++--- fonts.nix => sets/fonts.nix | 0 sets/hardware.nix | 5 +-- packages.nix => sets/packages.nix | 0 sets/sway.nix | 1 + sets/workstation.nix | 43 ++++++++++++++++++++++ system/mistmane/default.nix | 3 +- system/rainbowdash/default.nix | 4 +-- system/spike/default.nix | 3 +- system/starlight/default.nix | 4 +-- 11 files changed, 61 insertions(+), 65 deletions(-) rename fonts.nix => sets/fonts.nix (100%) rename packages.nix => sets/packages.nix (100%) create mode 100644 sets/workstation.nix diff --git a/configuration.nix b/configuration.nix index 6ae8dca..e271fa3 100644 --- a/configuration.nix +++ b/configuration.nix @@ -4,8 +4,6 @@ imports = [ ./private ./system/current - ./packages.nix - ./fonts.nix ]; nix = { @@ -25,58 +23,21 @@ earlySetup = true; }; - i18n.defaultLocale = "de_DE.UTF-8"; - nixpkgs.config.allowUnfree = true; time.timeZone = "Etc/UTC"; - environment = { - variables.TERMINAL = "alacritty"; - enableDebugInfo = true; - }; + environment.shellAliases.cp = "cp --reflink=auto --sparse=always"; - services = { - avahi = { - enable = true; - nssmdns = true; - publish.enable = true; - }; - flatpak.enable = true; - fwupd.enable = true; - kbfs.enable = true; - keybase.enable = true; - pcscd.enable = true; - syncthing = { - enable = true; - user = "artemis"; - dataDir = "/home/artemis"; - }; - udev.packages = [ - (pkgs.callPackage ./externals/rules/uhk.nix { }) - ]; - }; - - hardware = { - bluetooth.enable = true; - opengl.driSupport32Bit = true; - pulseaudio = { - enable = true; - package = pkgs.pulseaudioFull; - support32Bit = true; - daemon.config.flat-volumes = "no"; - }; + services.avahi = { + enable = true; + nssmdns = true; + publish.enable = true; }; networking.firewall.enable = false; - programs = { - gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; - fish.enable = true; - }; + programs.fish.enable = true; users = { users.artemis = { @@ -91,5 +52,5 @@ mutableUsers = false; }; systemd.extraConfig = "DefaultLimitCORE=infinity"; - security.pam.loginLimits = [{ domain = "*"; item = "core"; type = "hard"; value = "infinity"; }]; + security.pam.loginLimits = [ { domain = "*"; item = "core"; type = "hard"; value = "infinity"; } ]; } diff --git a/externals/packages/jlink/default.nix b/externals/packages/jlink/default.nix index 47f20f8..31428ad 100644 --- a/externals/packages/jlink/default.nix +++ b/externals/packages/jlink/default.nix @@ -18,7 +18,7 @@ , libXrandr }: let - jlinkVersion = "690a"; + jlinkVersion = "694"; architecture = { x86_64-linux = "x86_64"; @@ -28,10 +28,10 @@ let }.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"); sha256 = { - x86_64-linux = "1cn51q1i6lapcz1xs28aa8gydvr3g25g78iwx11xgvp8bwaw0qws"; - i686-linux = "107zdzgsshq80r2sxkfrfw5vs5bnyvf1g8payhd1x91r4cr9f01z"; - armv7l-linux = "0wqf390kw0h3ysiw1i4dd10dmcll496673w41p685zln9xxypkmg"; - aarch64-linux = "1mw037245b44adkdcbg7xn9ng70chsfk0id8acc28hz43a92jb8n"; + x86_64-linux = "1y1i30y8h9pq345r25wycnfns1zz0y3g7b66a82nx3075zx2n4lm"; + i686-linux = "1vdfxiwwxxr6vjybd0xl8iq79b5j7kd10bk9j22ghkg7b4mbsjrm"; + armv7l-linux = "0hpiirzy1921fca7b0bcrmc48r03r0lv0qph6xnqdkv66iplj1gz"; + aarch64-linux = "0c1sbyil6a97pr9ln9jf0ih6zmxvkl9lvxy86bbnbs8wrkgjfp8g"; }.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"); url = "https://www.segger.com/downloads/jlink/JLink_Linux_V${jlinkVersion}_${architecture}.tgz"; diff --git a/fonts.nix b/sets/fonts.nix similarity index 100% rename from fonts.nix rename to sets/fonts.nix diff --git a/sets/hardware.nix b/sets/hardware.nix index 504033f..055e3b4 100644 --- a/sets/hardware.nix +++ b/sets/hardware.nix @@ -1,9 +1,6 @@ { config, pkgs, ... }: let - call = - if (pkgs.targetPlatform.system == "x86_64-linux") then pkgs.pkgsi686Linux.callPackage - else pkgs.callPackage; - jlink = call ../externals/packages/jlink { }; + jlink = pkgs.callPackage ../externals/packages/jlink { }; in { services.udev.packages = [ diff --git a/packages.nix b/sets/packages.nix similarity index 100% rename from packages.nix rename to sets/packages.nix diff --git a/sets/sway.nix b/sets/sway.nix index ec80f95..08a1830 100644 --- a/sets/sway.nix +++ b/sets/sway.nix @@ -9,6 +9,7 @@ let }); in { + imports = [ ./fonts.nix ]; security.polkit.enable = true; services = { accounts-daemon.enable = true; diff --git a/sets/workstation.nix b/sets/workstation.nix new file mode 100644 index 0000000..8236d14 --- /dev/null +++ b/sets/workstation.nix @@ -0,0 +1,43 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ./sway.nix + ./packages.nix + ./pipewire.nix + ./neovim + ]; + + i18n.defaultLocale = "de_DE.UTF-8"; + + environment = { + variables.TERMINAL = "alacritty"; + enableDebugInfo = true; + }; + + services = { + flatpak.enable = true; + fwupd.enable = true; + kbfs.enable = true; + keybase.enable = true; + pcscd.enable = true; + syncthing = { + enable = true; + user = "artemis"; + dataDir = "/home/artemis"; + }; + udev.packages = [ + (pkgs.callPackage ../externals/rules/uhk.nix { }) + ]; + }; + + hardware = { + bluetooth.enable = true; + opengl.driSupport32Bit = true; + }; + + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; +} diff --git a/system/mistmane/default.nix b/system/mistmane/default.nix index e5e3d5b..240c252 100644 --- a/system/mistmane/default.nix +++ b/system/mistmane/default.nix @@ -5,9 +5,8 @@ ./boot-config.nix ./hardware-configuration.nix ../../externals/wip-pinebook-pro/pinebook_pro.nix - ../../sets/neovim - ../../sets/sway.nix ../../sets/wifi.nix + ../../sets/workstation.nix ]; networking.hostName = "mistmane"; diff --git a/system/rainbowdash/default.nix b/system/rainbowdash/default.nix index 57beee7..5fa0551 100644 --- a/system/rainbowdash/default.nix +++ b/system/rainbowdash/default.nix @@ -10,9 +10,7 @@ ../../sets/buildMachines.nix ../../sets/hacking.nix ../../sets/laptop.nix - ../../sets/neovim - ../../sets/pipewire.nix - ../../sets/sway.nix + ../../sets/workstation.nix ]; networking.hostName = "rainbowdash"; diff --git a/system/spike/default.nix b/system/spike/default.nix index d6093ff..1f01dc8 100644 --- a/system/spike/default.nix +++ b/system/spike/default.nix @@ -8,9 +8,8 @@ ../../sets/gpu/intel.nix ../../sets/hacking.nix ../../sets/laptop.nix - ../../sets/neovim ../../sets/ssh.nix - ../../sets/sway.nix + ../../sets/workstation.nix ]; networking.hostName = "spike"; diff --git a/system/starlight/default.nix b/system/starlight/default.nix index cf062cf..40a24a3 100644 --- a/system/starlight/default.nix +++ b/system/starlight/default.nix @@ -11,12 +11,10 @@ ../../sets/gpu/amd.nix ../../sets/hacking.nix ../../sets/hardware.nix - ../../sets/neovim - ../../sets/pipewire.nix ../../sets/printing.nix ../../sets/ssh.nix - ../../sets/sway.nix ../../sets/virtualization.nix + ../../sets/workstation.nix ]; # Network