From 01fc0e14ef3b6a8af8bb60f84ebb6b5474bab410 Mon Sep 17 00:00:00 2001 From: nin Date: Thu, 13 Jul 2017 23:53:54 +0200 Subject: move source config from module system to 1systems/*/source.nix --- nin/1systems/hiawatha.nix | 124 ------------------------------------- nin/1systems/hiawatha/config.nix | 129 +++++++++++++++++++++++++++++++++++++++ nin/1systems/hiawatha/source.nix | 4 ++ nin/1systems/onondaga.nix | 84 ------------------------- nin/1systems/onondaga/config.nix | 84 +++++++++++++++++++++++++ nin/1systems/onondaga/source.nix | 4 ++ nin/2configs/default.nix | 9 --- nin/2configs/nixpkgs.nix | 8 --- nin/source.nix | 19 ++++++ 9 files changed, 240 insertions(+), 225 deletions(-) delete mode 100644 nin/1systems/hiawatha.nix create mode 100644 nin/1systems/hiawatha/config.nix create mode 100644 nin/1systems/hiawatha/source.nix delete mode 100644 nin/1systems/onondaga.nix create mode 100644 nin/1systems/onondaga/config.nix create mode 100644 nin/1systems/onondaga/source.nix delete mode 100644 nin/2configs/nixpkgs.nix create mode 100644 nin/source.nix (limited to 'nin') diff --git a/nin/1systems/hiawatha.nix b/nin/1systems/hiawatha.nix deleted file mode 100644 index 12f2718bc..000000000 --- a/nin/1systems/hiawatha.nix +++ /dev/null @@ -1,124 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, lib, pkgs, ... }: - -with lib; - -{ - imports = [ - ../. - - ../2configs/copyq.nix - ../2configs/games.nix - ../2configs/git.nix - ../2configs/retiolum.nix - ../2configs/termite.nix - ]; - - krebs.build.host = config.krebs.hosts.hiawatha; - - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "sd_mod" "sr_mod" "rtsx_pci_sdmmc" ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/b83f8830-84f3-4282-b10e-015c4b76bd9e"; - fsType = "ext4"; - }; - - fileSystems."/tmp" = - { device = "tmpfs"; - fsType = "tmpfs"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/2f319b08-2560-401d-b53c-2abd28f1a010"; - fsType = "ext2"; - }; - - boot.initrd.luks.devices = [ { name = "luksroot"; device = "/dev/sda2"; } ]; - boot.initrd.luks.cryptoModules = [ "aes" "sha512" "sha1" "xts" ]; - - swapDevices = [ ]; - - nix.maxJobs = lib.mkDefault 4; - # Use the GRUB 2 boot loader. - boot.loader.grub.enable = true; - boot.loader.grub.version = 2; - # Define on which hard drive you want to install Grub. - boot.loader.grub.device = "/dev/sda"; - - # Enable the OpenSSH daemon. - services.openssh.enable = true; - - # Enable CUPS to print documents. - # services.printing.enable = true; - - fileSystems."/home/nin/.local/share/Steam" = { - device = "/dev/fam/steam"; - }; - - # nin config - time.timeZone = "Europe/Berlin"; - services.xserver.enable = true; - - networking.networkmanager.enable = true; - #networking.wireless.enable = true; - - hardware.pulseaudio = { - enable = true; - systemWide = true; - }; - - hardware.bluetooth.enable = true; - - hardware.opengl.driSupport32Bit = true; - - #nixpkgs.config.steam.java = true; - - environment.systemPackages = with pkgs; [ - firefox - git - networkmanagerapplet - python - steam - thunderbird - vim - virtmanager - ]; - - nixpkgs.config = { - - allowUnfree = true; - - firefox = { - enableGoogleTalkPlugin = true; - enableAdobeFlash = true; - }; - }; - - #services.logind.extraConfig = "HandleLidSwitch=ignore"; - - services.xserver.synaptics = { - enable = true; - }; - - - services.xserver.desktopManager.xfce = let - xbindConfig = pkgs.writeText "xbindkeysrc" '' - "${pkgs.pass}/bin/passmenu --type" - Control + p - ''; - in { - enable = true; - extraSessionCommands = '' - ${pkgs.xbindkeys}/bin/xbindkeys -f ${xbindConfig} - ''; - }; - - # The NixOS release to be compatible with for stateful data such as databases. - system.stateVersion = "17.03"; - -} diff --git a/nin/1systems/hiawatha/config.nix b/nin/1systems/hiawatha/config.nix new file mode 100644 index 000000000..0e48b41c2 --- /dev/null +++ b/nin/1systems/hiawatha/config.nix @@ -0,0 +1,129 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, lib, pkgs, ... }: + +with lib; + +{ + imports = [ + + + #../2configs/copyq.nix + + + + + ]; + + krebs.build.host = config.krebs.hosts.hiawatha; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "sd_mod" "sr_mod" "rtsx_pci_sdmmc" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/b83f8830-84f3-4282-b10e-015c4b76bd9e"; + fsType = "ext4"; + }; + + fileSystems."/tmp" = + { device = "tmpfs"; + fsType = "tmpfs"; + }; + + fileSystems."/home" = + { device = "/dev/fam/home"; + }; + + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/2f319b08-2560-401d-b53c-2abd28f1a010"; + fsType = "ext2"; + }; + + boot.initrd.luks.devices = [ { name = "luksroot"; device = "/dev/sda2"; } ]; + boot.initrd.luks.cryptoModules = [ "aes" "sha512" "sha1" "xts" ]; + + swapDevices = [ ]; + + nix.maxJobs = lib.mkDefault 4; + # Use the GRUB 2 boot loader. + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + # Define on which hard drive you want to install Grub. + boot.loader.grub.device = "/dev/sda"; + + # Enable the OpenSSH daemon. + services.openssh.enable = true; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + fileSystems."/home/nin/.local/share/Steam" = { + device = "/dev/fam/steam"; + }; + + # nin config + time.timeZone = "Europe/Berlin"; + services.xserver.enable = true; + + networking.networkmanager.enable = true; + #networking.wireless.enable = true; + + hardware.pulseaudio = { + enable = true; + systemWide = true; + }; + + hardware.bluetooth.enable = true; + + hardware.opengl.driSupport32Bit = true; + + #nixpkgs.config.steam.java = true; + + environment.systemPackages = with pkgs; [ + firefox + git + networkmanagerapplet + python + steam + thunderbird + vim + virtmanager + ]; + + nixpkgs.config = { + + allowUnfree = true; + + firefox = { + enableGoogleTalkPlugin = true; + enableAdobeFlash = true; + }; + }; + + #services.logind.extraConfig = "HandleLidSwitch=ignore"; + + services.xserver.synaptics = { + enable = true; + }; + + + services.xserver.desktopManager.xfce = let + xbindConfig = pkgs.writeText "xbindkeysrc" '' + "${pkgs.pass}/bin/passmenu --type" + Control + p + ''; + in { + enable = true; + extraSessionCommands = '' + ${pkgs.xbindkeys}/bin/xbindkeys -f ${xbindConfig} + ''; + }; + + # The NixOS release to be compatible with for stateful data such as databases. + system.stateVersion = "17.03"; + +} diff --git a/nin/1systems/hiawatha/source.nix b/nin/1systems/hiawatha/source.nix new file mode 100644 index 000000000..a4b366b9c --- /dev/null +++ b/nin/1systems/hiawatha/source.nix @@ -0,0 +1,4 @@ +import { + name = "hiawatha"; + secure = true; +} diff --git a/nin/1systems/onondaga.nix b/nin/1systems/onondaga.nix deleted file mode 100644 index 576847032..000000000 --- a/nin/1systems/onondaga.nix +++ /dev/null @@ -1,84 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, lib, pkgs, ... }: - -{ - imports = [ - ../. - - ../2configs/retiolum.nix - ../2configs/weechat.nix - ../2configs/git.nix - ]; - - krebs.build.host = config.krebs.hosts.onondaga; - - boot.loader.grub.enable = true; - boot.loader.grub.version = 2; - # boot.loader.grub.efiSupport = true; - # boot.loader.grub.efiInstallAsRemovable = true; - # boot.loader.efi.efiSysMountPoint = "/boot/efi"; - # Define on which hard drive you want to install Grub. - boot.loader.grub.device = "/dev/sda"; - - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # Select internationalisation properties. - # i18n = { - # consoleFont = "Lat2-Terminus16"; - # consoleKeyMap = "us"; - # defaultLocale = "en_US.UTF-8"; - # }; - - # Set your time zone. - time.timeZone = "Europe/Amsterdam"; - - # List packages installed in system profile. To search by name, run: - # $ nix-env -qaP | grep wget - # environment.systemPackages = with pkgs; [ - # wget - # ]; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. - services.openssh.enable = true; - - # Enable CUPS to print documents. - # services.printing.enable = true; - - # Enable the X11 windowing system. - # services.xserver.enable = true; - # services.xserver.layout = "us"; - # services.xserver.xkbOptions = "eurosign:e"; - - # Enable the KDE Desktop Environment. - # services.xserver.displayManager.kdm.enable = true; - # services.xserver.desktopManager.kde4.enable = true; - - # Define a user account. Don't forget to set a password with ‘passwd’. - # users.extraUsers.guest = { - # isNormalUser = true; - # uid = 1000; - # }; - - # The NixOS release to be compatible with for stateful data such as databases. - system.stateVersion = "16.09"; - - boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "ehci_pci" "sd_mod" "sr_mod" ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/7238cc6e-4bea-4e52-9408-32d8aa05abff"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/5e923175-854b-4bcf-97c8-f3a91806fa22"; - fsType = "ext2"; - }; - - nix.maxJobs = lib.mkDefault 1; - -} diff --git a/nin/1systems/onondaga/config.nix b/nin/1systems/onondaga/config.nix new file mode 100644 index 000000000..242d67c26 --- /dev/null +++ b/nin/1systems/onondaga/config.nix @@ -0,0 +1,84 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, lib, pkgs, ... }: + +{ + imports = [ + + + + + + ]; + + krebs.build.host = config.krebs.hosts.onondaga; + + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + # boot.loader.grub.efiSupport = true; + # boot.loader.grub.efiInstallAsRemovable = true; + # boot.loader.efi.efiSysMountPoint = "/boot/efi"; + # Define on which hard drive you want to install Grub. + boot.loader.grub.device = "/dev/sda"; + + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Select internationalisation properties. + # i18n = { + # consoleFont = "Lat2-Terminus16"; + # consoleKeyMap = "us"; + # defaultLocale = "en_US.UTF-8"; + # }; + + # Set your time zone. + time.timeZone = "Europe/Amsterdam"; + + # List packages installed in system profile. To search by name, run: + # $ nix-env -qaP | grep wget + # environment.systemPackages = with pkgs; [ + # wget + # ]; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + services.openssh.enable = true; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + # Enable the X11 windowing system. + # services.xserver.enable = true; + # services.xserver.layout = "us"; + # services.xserver.xkbOptions = "eurosign:e"; + + # Enable the KDE Desktop Environment. + # services.xserver.displayManager.kdm.enable = true; + # services.xserver.desktopManager.kde4.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + # users.extraUsers.guest = { + # isNormalUser = true; + # uid = 1000; + # }; + + # The NixOS release to be compatible with for stateful data such as databases. + system.stateVersion = "16.09"; + + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "ehci_pci" "sd_mod" "sr_mod" ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/7238cc6e-4bea-4e52-9408-32d8aa05abff"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/5e923175-854b-4bcf-97c8-f3a91806fa22"; + fsType = "ext2"; + }; + + nix.maxJobs = lib.mkDefault 1; + +} diff --git a/nin/1systems/onondaga/source.nix b/nin/1systems/onondaga/source.nix new file mode 100644 index 000000000..60d020222 --- /dev/null +++ b/nin/1systems/onondaga/source.nix @@ -0,0 +1,4 @@ +import { + name = "onondaga"; + secure = true; +} diff --git a/nin/2configs/default.nix b/nin/2configs/default.nix index cb02521ce..212fd368e 100644 --- a/nin/2configs/default.nix +++ b/nin/2configs/default.nix @@ -3,7 +3,6 @@ with import ; { imports = [ - ../2configs/nixpkgs.nix ../2configs/vim.nix { users.extraUsers = @@ -62,14 +61,6 @@ with import ; search-domain = "r"; build = { user = config.krebs.users.nin; - source = let inherit (config.krebs.build) host; in { - nixos-config.symlink = "stockholm/nin/1systems/${host.name}.nix"; - secrets.file = - if getEnv "dummy_secrets" == "true" - then toString - else "/home/nin/secrets/${host.name}"; - stockholm.file = getEnv "PWD"; - }; }; }; diff --git a/nin/2configs/nixpkgs.nix b/nin/2configs/nixpkgs.nix deleted file mode 100644 index c46331b0d..000000000 --- a/nin/2configs/nixpkgs.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: - -{ - krebs.build.source.nixpkgs.git = { - url = https://github.com/nixos/nixpkgs; - ref = "01c3847"; - }; -} diff --git a/nin/source.nix b/nin/source.nix new file mode 100644 index 000000000..1eb9185ab --- /dev/null +++ b/nin/source.nix @@ -0,0 +1,19 @@ +with import ; +host@{ name, secure ? false }: let + builder = if getEnv "dummy_secrets" == "true" + then "buildbot" + else "nin"; + _file = + "/nin/1systems/${name}/source.nix"; +in + evalSource (toString _file) { + nixos-config.symlink = "stockholm/nin/1systems/${name}/config.nix"; + secrets.file = getAttr builder { + buildbot = toString ; + nin = "/home/nin/secrets/${name}"; + }; + stockholm.file = toString ; + nixpkgs.git = { + url = https://github.com/nixos/nixpkgs; + ref = "01c3847"; + }; + } -- cgit v1.2.3