From 5ea3e8730dfa9484c3433eaf129037f9204c9b6c Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Fri, 13 Sep 2024 14:10:54 +0200 Subject: [PATCH 1/2] Multiple changes (cleanup, remove edison, add felixalbpc) - Removes hold host edison - Adds new host, felixalbpc, a work machine. This requires some cleanup to fit into the office network, use other SSH keys, etc. - Clean up some package installs, putting more things into the common home-manager packages, rather than systemwide or host-specific homes. - Various small changes like disabling Github Copilot on nvim startup. --- base.nix | 13 ++--- flake.nix | 52 ++++++++++-------- home/base.nix | 8 ++- home/neovim.nix | 4 ++ home/zsh.nix | 3 +- hosts/edison/configuration.nix | 55 ------------------- hosts/edison/desktop/remote.nix | 12 ---- hosts/edison/desktop/xfce.nix | 10 ---- hosts/edison/email.nix | 52 ------------------ hosts/edison/hardware-configuration.nix | 46 ---------------- hosts/felixalbpc/configuration.nix | 35 ++++++++++++ .../desktop/default.nix | 47 ++++++++-------- .../{edison => felixalbpc}/desktop/gnome.nix | 0 hosts/{edison => felixalbpc}/home.nix | 31 +++++------ hosts/worf/home.nix | 3 - 15 files changed, 117 insertions(+), 254 deletions(-) delete mode 100644 hosts/edison/configuration.nix delete mode 100644 hosts/edison/desktop/remote.nix delete mode 100644 hosts/edison/desktop/xfce.nix delete mode 100644 hosts/edison/email.nix delete mode 100644 hosts/edison/hardware-configuration.nix create mode 100644 hosts/felixalbpc/configuration.nix rename hosts/{edison => felixalbpc}/desktop/default.nix (61%) rename hosts/{edison => felixalbpc}/desktop/gnome.nix (100%) rename hosts/{edison => felixalbpc}/home.nix (61%) diff --git a/base.nix b/base.nix index 7c2b478..89d5d1b 100644 --- a/base.nix +++ b/base.nix @@ -5,8 +5,8 @@ boot.loader.efi.canTouchEfiVariables = true; networking = { - domain = "home.feal.no"; - nameservers = [ "192.168.10.175" "192.168.10.1" "1.1.1.1" ]; + domain = lib.mkDefault "home.feal.no"; + nameservers = lib.mkDefault [ "192.168.10.175" "192.168.10.1" "1.1.1.1" ]; useDHCP = lib.mkDefault false; }; @@ -40,7 +40,6 @@ programs.zsh.enable = true; environment.systemPackages = with pkgs; [ - bat bottom duf eza @@ -51,14 +50,12 @@ htop iotop lm_sensors - neofetch nix-output-monitor p7zip python3 ripgrep rsync screen - sshfs unzip usbutils vim @@ -85,12 +82,12 @@ users.users.felixalb = { isNormalUser = true; - extraGroups = [ + extraGroups = lib.mkDefault [ "wheel" "docker" ]; - uid = 1000; - openssh.authorizedKeys.keys = [ + uid = lib.mkDefault 1000; + openssh.authorizedKeys.keys = lib.mkDefault [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDKzPICGew7uN0cmvRmbwkwTCodTBUgEhkoftQnZuO4Q felixalbrigtsen@gmail.com" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBTXSL0w7OUcz1LzEt1T3I3K5RgyNV+MYz0x/1RbpDHQ felixalb@worf" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFiPHhj0YbklJnJNcxD0IlzPxLTGfv095H5zyS/1Wb64 felixalb@edison.home.feal.no" diff --git a/flake.nix b/flake.nix index 69da7a6..bc58a5c 100644 --- a/flake.nix +++ b/flake.nix @@ -47,6 +47,27 @@ in { nixosConfigurations = { + # Networking / VPN Gateway + burnham = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { + inherit inputs; + }; + modules = [ + # Overlays-module makes "pkgs.unstable" available in configuration.nix + ({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; }) + + ./hosts/burnham/configuration.nix + ./common/domeneshop-dyndns.nix + sops-nix.nixosModules.sops + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users."felixalb" = import ./hosts/burnham/home.nix; + } + ]; + }; + # Media / storage server challenger = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { @@ -66,6 +87,7 @@ } ]; }; + # General application server defiant = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { @@ -86,7 +108,8 @@ } ]; }; - edison = nixpkgs.lib.nixosSystem { + # Work desktop + felixalbpc = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; @@ -95,35 +118,16 @@ # Overlays-module makes "pkgs.unstable" available in configuration.nix ({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; }) - ./hosts/edison/configuration.nix + ./hosts/felixalbpc/configuration.nix sops-nix.nixosModules.sops home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users."felixalb" = import ./hosts/edison/home.nix; + home-manager.users."felixalb" = import ./hosts/felixalbpc/home.nix; } ]; }; - burnham = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { - inherit inputs; - }; - modules = [ - # Overlays-module makes "pkgs.unstable" available in configuration.nix - ({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; }) - - ./hosts/burnham/configuration.nix - ./common/domeneshop-dyndns.nix - sops-nix.nixosModules.sops - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users."felixalb" = import ./hosts/burnham/home.nix; - } - ]; - }; - + # Web host malcolm = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { @@ -143,7 +147,7 @@ ]; }; }; - + # Daily driver macbook darwinConfigurations.worf = nix-darwin.lib.darwinSystem { system = "aarch64-darwin"; specialArgs = { diff --git a/home/base.nix b/home/base.nix index ae501ad..7977eed 100644 --- a/home/base.nix +++ b/home/base.nix @@ -7,9 +7,13 @@ home = { packages = with pkgs; [ + bat bottom - unstable.ncdu + ncdu neofetch + nodejs + sshfs + sshuttle ]; sessionVariables = { @@ -35,7 +39,7 @@ user = { name = "Felix Albrigtsen"; - email = "felix@albrigtsen.it"; + email = lib.mkDefault "felix@albrigtsen.it"; }; }; ignores = [ diff --git a/home/neovim.nix b/home/neovim.nix index d146061..905e173 100644 --- a/home/neovim.nix +++ b/home/neovim.nix @@ -32,6 +32,7 @@ in { coc-pyright vim-nix + vim-puppet ]; withNodeJs = true; @@ -122,6 +123,9 @@ in { " Disable search highlights map :noh + + " Start with copilot disabled + autocmd VimEnter * Copilot disable ''; }; diff --git a/home/zsh.nix b/home/zsh.nix index 949a5a8..cdb1e88 100644 --- a/home/zsh.nix +++ b/home/zsh.nix @@ -14,6 +14,8 @@ pwdLength = "long"; showReturnVal = true; }; + history.extended = true; + historySubstringSearch.enable = true; terminal.autoTitle = true; pmodules = [ @@ -28,7 +30,6 @@ "git" "autosuggestions" "syntax-highlighting" - "history-substring-search" "prompt" ]; }; diff --git a/hosts/edison/configuration.nix b/hosts/edison/configuration.nix deleted file mode 100644 index 5db65ab..0000000 --- a/hosts/edison/configuration.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - imports = - [ - ../../base.nix - ../../common/metrics-exporters.nix - ./hardware-configuration.nix - ./desktop - ]; - - virtualisation.docker.enable = true; - systemd.coredump.enable = true; - - networking = { - hostName = "edison"; - defaultGateway = "192.168.10.1"; - - interfaces.enp4s0.useDHCP = false; - interfaces.enp4s0.ipv4.addresses = [ - { address = "192.168.10.170"; prefixLength = 24; } - ]; - - hostId = "8e84b281"; - }; - - console.keyMap = "us"; - - # sops.defaultSopsFile = ../../secrets/edison/edison.yaml; - - environment.variables = { EDITOR = "vim"; }; - environment.systemPackages = with pkgs; [ - discord - gimp - gparted - openvpn - pavucontrol - unstable.element-desktop - unstable.hydrus - ]; - - programs.steam.enable = true; - - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "discord" - "nvidia-x11" - "nvidia-settings" - "steam" - "steam-original" - "steam-run" - ]; - - system.stateVersion = "23.05"; -} - diff --git a/hosts/edison/desktop/remote.nix b/hosts/edison/desktop/remote.nix deleted file mode 100644 index b5076cd..0000000 --- a/hosts/edison/desktop/remote.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, pkgs, lib, ... }: -{ - # Microsoft-style Remote Desktop: - services.xrdp = { - enable = true; - defaultWindowManager = "xfce4-session"; # Avoid fancy animations, no hyprland/GNOME! - openFirewall = true; - }; - - # X window forwarding with `ssh -Y` - services.openssh.settings.X11Forwarding = true; -} diff --git a/hosts/edison/desktop/xfce.nix b/hosts/edison/desktop/xfce.nix deleted file mode 100644 index 1592e46..0000000 --- a/hosts/edison/desktop/xfce.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config, pkgs, lib, ... }: -{ - services.xserver = { - desktopManager.xfce.enable = true; - }; - - environment.systemPackages = with pkgs; [ - xfce.xfce4-pulseaudio-plugin - ]; -} diff --git a/hosts/edison/email.nix b/hosts/edison/email.nix deleted file mode 100644 index 68ffdb1..0000000 --- a/hosts/edison/email.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ config, pkgs, lib, ... }: -{ - programs.neomutt = { - enable = true; - sidebar = { - enable = true; - width = 30; - }; - sort = "reverse-threads"; - vimKeys = true; - checkStatsInterval = 60; - }; - - programs.mbsync.enable = true; - programs.notmuch = { - enable = true; - hooks = { - preNew = "mbsync --all"; - }; - }; - # programs.msmtp.enable = true; - - accounts.email = { - accounts.felix-albrigtsen-it = rec { - address = "felix@albrigtsen.it"; - userName = address; - primary = true; - realName = "Felix Albrigtsen"; - signature = { - text = '' - Med vennlig hilsen - ${realName} - ''; - showSignature = "append"; - }; - - imap.host = "imap.migadu.com"; - smtp.host = "smtp.migadu.com"; - passwordCommand = "cat ~/.secrets/email/migadu"; # yolo / TODO - - mbsync = { - enable = true; - create = "maildir"; # Create subfolders locally - # expugne = "both"; - }; - msmtp.enable = true; - notmuch.enable = true; - neomutt.enable = true; - }; - }; -} - diff --git a/hosts/edison/hardware-configuration.nix b/hosts/edison/hardware-configuration.nix deleted file mode 100644 index f2fd0c5..0000000 --- a/hosts/edison/hardware-configuration.nix +++ /dev/null @@ -1,46 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/14b254e1-d94f-4b9b-a910-7fcf7e33af46"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/A197-7913"; - fsType = "vfat"; - }; - - fileSystems."/data" = - { device = "/dev/disk/by-uuid/ebbdf34e-adec-4df3-bbed-20d80455f3f7"; - fsType = "ext4"; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/d56040a0-3009-4899-95fa-1b82e60e32e4"; } - ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault false; - # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/felixalbpc/configuration.nix b/hosts/felixalbpc/configuration.nix new file mode 100644 index 0000000..f796cdb --- /dev/null +++ b/hosts/felixalbpc/configuration.nix @@ -0,0 +1,35 @@ +{ config, pkgs, lib, ... }: + +{ + imports = + [ + ../../base.nix + # ./hardware-configuration.nix + ./desktop + ]; + + networking = { + interfaces.eno1 = { + useDHCP = true; + ipv6.addresses = [ + { address = "2001:700:300:22::15"; prefixLength = 64; } + ]; + }; + + hostName = "felixalbpc"; + nameservers = [ "129.241.0.200" "129.241.0.201" "2001:700:300::200" "2001:700:300::201" ]; + domain = "it.ntnu.no"; + hostId = "f458d6aa"; + }; + + console.keyMap = "no"; + + users.users.felixalb = { + uid = 1328256; + extraGroups = [ "wheel" ]; + openssh.authorizedKeys.keys = [ ]; + }; + + system.stateVersion = "24.05"; +} + diff --git a/hosts/edison/desktop/default.nix b/hosts/felixalbpc/desktop/default.nix similarity index 61% rename from hosts/edison/desktop/default.nix rename to hosts/felixalbpc/desktop/default.nix index 51cf7e2..94f4774 100644 --- a/hosts/edison/desktop/default.nix +++ b/hosts/felixalbpc/desktop/default.nix @@ -12,18 +12,17 @@ enable = true; wayland = true; }; - videoDrivers = [ "nvidia" ]; xkbOptions = "ctrl:nocaps"; layout = "no,us"; xkbVariant = "intl"; }; - #hardware.nvidia.modesetting.enable = true; # TODO: Fix this. Steam crashes, and textures/fonts unload when suspended. hardware.keyboard.zsa.enable = true; environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.systemPackages = with pkgs; [ xclip + pavucontrol ]; hardware.opengl.enable = true; @@ -55,28 +54,28 @@ ]; }; - # Dark mode - home-manager.users.felixalb = { - dconf.settings = { - "org/gnome/desktop/interface" = { - color-scheme = "prefer-dark"; - }; - }; + # # Dark mode + # home-manager.users.felixalb = { + # dconf.settings = { + # "org/gnome/desktop/interface" = { + # color-scheme = "prefer-dark"; + # }; + # }; - gtk = { - enable = true; - theme = { - name = "Adwaita-dark"; - package = pkgs.gnome.gnome-themes-extra; - }; - }; - }; + # gtk = { + # enable = true; + # theme = { + # name = "Adwaita-dark"; + # package = pkgs.gnome.gnome-themes-extra; + # }; + # }; + # }; - qt = { - enable = true; - platformTheme = "gnome"; - style = "adwaita-dark"; - }; + # qt = { + # enable = true; + # platformTheme = "gnome"; + # style = "adwaita-dark"; + # }; # Misc: xdg.portal = { @@ -85,7 +84,5 @@ }; location.provider = "geoclue2"; security.polkit.enable = true; - services.flatpak.enable = true; - services.redshift.enable = true; - users.users."felixalb".packages = [ pkgs.flatpak ]; + services.openssh.settings.X11Forwarding = true; } diff --git a/hosts/edison/desktop/gnome.nix b/hosts/felixalbpc/desktop/gnome.nix similarity index 100% rename from hosts/edison/desktop/gnome.nix rename to hosts/felixalbpc/desktop/gnome.nix diff --git a/hosts/edison/home.nix b/hosts/felixalbpc/home.nix similarity index 61% rename from hosts/edison/home.nix rename to hosts/felixalbpc/home.nix index d82f0e2..18a7bdf 100644 --- a/hosts/edison/home.nix +++ b/hosts/felixalbpc/home.nix @@ -1,30 +1,29 @@ { pkgs, lib, ... }: { + imports = [ + ./../../home/base.nix + ]; + home.packages = with pkgs; [ - nix-index - unstable.snicat + aerc + element-desktop + openstackclient + remmina python3 ] ++ (with python3Packages; [ - beautifulsoup4 - numpy - pillow - pwntools - pycryptodome - requests - ]); - - imports = [ - ./../../home/base.nix - ./email.nix - ]; + numpy + pycryptodome + requests + ]); programs = { zsh.shellAliases."rebuild" = "sudo nixos-rebuild switch --flake /config"; + git.extraConfig.user.email = "felix.albrigtsen@ntnu.no"; alacritty.enable = true; firefox.enable = true; rofi.enable = true; - }; + }; - home.stateVersion = "23.05"; + home.stateVersion = "24.05"; } diff --git a/hosts/worf/home.nix b/hosts/worf/home.nix index 284ccdf..25e353b 100644 --- a/hosts/worf/home.nix +++ b/hosts/worf/home.nix @@ -18,14 +18,11 @@ spotify aerc - bat borgbackup catimg cocoapods gnutar nix-index - nodejs - sshuttle tldr unstable.snicat w3m -- 2.44.1 From 38648a08ed5887caf103110fa8b561493ae65d26 Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Fri, 13 Sep 2024 14:10:29 +0200 Subject: [PATCH 2/2] Finish felixalbpc, cleanup home-manager --- home/base.nix | 3 +- home/neovim.nix | 5 ++- home/zsh.nix | 4 +- hosts/felixalbpc/configuration.nix | 7 +++- hosts/felixalbpc/desktop/default.nix | 35 ++++++++++------ hosts/felixalbpc/desktop/gnome.nix | 10 ----- hosts/felixalbpc/hardware-configuration.nix | 35 ++++++++++++++++ hosts/felixalbpc/home.nix | 45 ++++++++++++++++----- hosts/worf/home.nix | 8 +++- 9 files changed, 111 insertions(+), 41 deletions(-) delete mode 100644 hosts/felixalbpc/desktop/gnome.nix create mode 100644 hosts/felixalbpc/hardware-configuration.nix diff --git a/home/base.nix b/home/base.nix index 7977eed..d0d16c1 100644 --- a/home/base.nix +++ b/home/base.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { imports = [ ./neovim.nix @@ -11,7 +11,6 @@ bottom ncdu neofetch - nodejs sshfs sshuttle ]; diff --git a/home/neovim.nix b/home/neovim.nix index 905e173..5e19b90 100644 --- a/home/neovim.nix +++ b/home/neovim.nix @@ -21,7 +21,6 @@ in { telescope-nvim nvim-lspconfig - # copilot-vim nvim-treesitter coc-css @@ -125,7 +124,9 @@ in { map :noh " Start with copilot disabled - autocmd VimEnter * Copilot disable + if exists("*Copilot") + autocmd VimEnter * Copilot disable + endif ''; }; diff --git a/home/zsh.nix b/home/zsh.nix index cdb1e88..38b7716 100644 --- a/home/zsh.nix +++ b/home/zsh.nix @@ -2,6 +2,7 @@ programs = { zsh = { enable = true; + history.extended = true; prezto = { enable = true; @@ -14,8 +15,6 @@ pwdLength = "long"; showReturnVal = true; }; - history.extended = true; - historySubstringSearch.enable = true; terminal.autoTitle = true; pmodules = [ @@ -23,6 +22,7 @@ "terminal" "editor" "history" + "history-substring-search" # "directory" "spectrum" # "utility" diff --git a/hosts/felixalbpc/configuration.nix b/hosts/felixalbpc/configuration.nix index f796cdb..d25853b 100644 --- a/hosts/felixalbpc/configuration.nix +++ b/hosts/felixalbpc/configuration.nix @@ -4,7 +4,7 @@ imports = [ ../../base.nix - # ./hardware-configuration.nix + ./hardware-configuration.nix ./desktop ]; @@ -16,6 +16,7 @@ ]; }; + tempAddresses = "disabled"; hostName = "felixalbpc"; nameservers = [ "129.241.0.200" "129.241.0.201" "2001:700:300::200" "2001:700:300::201" ]; domain = "it.ntnu.no"; @@ -24,6 +25,10 @@ console.keyMap = "no"; + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "copilot.vim" + ]; + users.users.felixalb = { uid = 1328256; extraGroups = [ "wheel" ]; diff --git a/hosts/felixalbpc/desktop/default.nix b/hosts/felixalbpc/desktop/default.nix index 94f4774..d300599 100644 --- a/hosts/felixalbpc/desktop/default.nix +++ b/hosts/felixalbpc/desktop/default.nix @@ -1,29 +1,38 @@ { config, pkgs, lib, ... }: { - imports = [ - ./remote.nix - ./gnome.nix - ./xfce.nix - ]; - services.xserver = { enable = true; displayManager.gdm = { enable = true; wayland = true; }; - xkbOptions = "ctrl:nocaps"; - layout = "no,us"; - xkbVariant = "intl"; + xkb = { + options = "ctrl:nocaps"; + variant = "intl"; + layout = "no,us"; + }; + windowManager.qtile.enable = true; }; + programs.hyprland.enable = true; + hardware.keyboard.zsa.enable = true; environment.sessionVariables.NIXOS_OZONE_WL = "1"; - environment.systemPackages = with pkgs; [ - xclip - pavucontrol - ]; + home-manager.users.felixalb = { + services = { + dunst.enable = true; + }; + home.packages = with pkgs; [ + i3lock + libnotify + pamixer + pavucontrol + sxhkd + xclip + xss-lock + ]; + }; hardware.opengl.enable = true; diff --git a/hosts/felixalbpc/desktop/gnome.nix b/hosts/felixalbpc/desktop/gnome.nix deleted file mode 100644 index bb305fe..0000000 --- a/hosts/felixalbpc/desktop/gnome.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config, pkgs, lib, ... }: -{ - services.xserver.desktopManager.gnome.enable = true; - environment.systemPackages = with pkgs; [ - gnomeExtensions.appindicator - gnome.adwaita-icon-theme - ]; - services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; - programs.dconf.enable = true; -} diff --git a/hosts/felixalbpc/hardware-configuration.nix b/hosts/felixalbpc/hardware-configuration.nix new file mode 100644 index 0000000..9fc73e7 --- /dev/null +++ b/hosts/felixalbpc/hardware-configuration.nix @@ -0,0 +1,35 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + boot.initrd.luks.devices."cryptlvm".device = "/dev/disk/by-uuid/7516ebdb-14c3-4cb5-9d06-5e9d0e34b798"; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/02ac773e-31ff-4579-ad9a-859ba74f2a9e"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/77ED-720D"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-label/swap"; } + ]; + + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/felixalbpc/home.nix b/hosts/felixalbpc/home.nix index 18a7bdf..4a79424 100644 --- a/hosts/felixalbpc/home.nix +++ b/hosts/felixalbpc/home.nix @@ -2,27 +2,54 @@ { imports = [ ./../../home/base.nix + ./../../home/alacritty.nix ]; home.packages = with pkgs; [ - aerc + catimg + chromium + dante + dig element-desktop + jq + maim + mpv + oauth2ms + openssl openstackclient + pwgen remmina + w3m - python3 - ] ++ (with python3Packages; [ - numpy - pycryptodome - requests - ]); + (python311.withPackages (ps: with ps; [ + numpy + pycryptodome + python-novaclient + requests + ])) + ]; programs = { - zsh.shellAliases."rebuild" = "sudo nixos-rebuild switch --flake /config"; - git.extraConfig.user.email = "felix.albrigtsen@ntnu.no"; + aerc.enable = true; alacritty.enable = true; firefox.enable = true; + git.extraConfig.user.email = "felix.albrigtsen@ntnu.no"; rofi.enable = true; + zsh.shellAliases."rebuild" = "sudo nixos-rebuild switch --flake /config"; + + neovim.plugins = with pkgs.vimPlugins; [ copilot-vim ]; + }; + + xdg.mimeApps = { + enable = true; + + defaultApplications = { + "text/html" = "firefox.desktop"; + "x-scheme-handler/http" = "firefox.desktop"; + "x-scheme-handler/https" = "firefox.desktop"; + "x-scheme-handler/about" = "firefox.desktop"; + "x-scheme-handler/unknown" = "firefox.desktop"; + }; }; home.stateVersion = "24.05"; diff --git a/hosts/worf/home.nix b/hosts/worf/home.nix index 25e353b..dd0121f 100644 --- a/hosts/worf/home.nix +++ b/hosts/worf/home.nix @@ -23,6 +23,7 @@ cocoapods gnutar nix-index + nodejs tldr unstable.snicat w3m @@ -40,8 +41,11 @@ prezto.pmodules = [ "ssh" ]; }; - # Ctrl+y + , - programs.neovim.plugins = with pkgs.vimPlugins; [ coc-emmet emmet-vim ]; + programs.neovim.plugins = with pkgs.vimPlugins; [ + coc-emmet + copilot-vim + emmet-vim # Ctrl+y + , + ]; # Copy Applications to ~/Applications to allow them to be launched from Spotlight disabledModules = [ "targets/darwin/linkapps.nix" ]; -- 2.44.1