diff --git a/config/base.nix b/config/base.nix index 940cb74..243c005 100644 --- a/config/base.nix +++ b/config/base.nix @@ -123,7 +123,7 @@ (st.overrideAttrs (oldAttrs: rec { src = builtins.fetchGit { url = "https://github.com/fwastring/st"; - rev = "9b95aafa2bcb3f4f991a5fc2c7cb939ce3f550b2"; + rev = "de286ce570c23e037a0e5fb7d84ac7226aef1259"; }; buildInputs = oldAttrs.buildInputs ++ [ xorg.libX11.dev xorg.libXft imlib2 xorg.libXinerama pkg-config]; })) diff --git a/config/dev.nix b/config/dev.nix index 04b8071..fc352bf 100644 --- a/config/dev.nix +++ b/config/dev.nix @@ -12,6 +12,11 @@ environment.systemPackages = with pkgs; [ timewarrior + kubectl + azure-cli + dotnetCorePackages.sdk_8_0_3xx + docker-slim + sqlc postgresql argocd @@ -29,7 +34,6 @@ unstable.k9s git lazydocker - kubectl gcc gnumake cmake diff --git a/config/programs.nix b/config/programs.nix index d5aa58a..5583b38 100644 --- a/config/programs.nix +++ b/config/programs.nix @@ -28,5 +28,9 @@ feh pavucontrol scrot + imagemagick + pandoc + texliveFull + mpv ]; } diff --git a/config/system.nix b/config/system.nix index 72b2ec4..9cfac52 100644 --- a/config/system.nix +++ b/config/system.nix @@ -11,6 +11,7 @@ environment.systemPackages = with pkgs; [ # System + libnotify xsel xbanish unzip diff --git a/flake.nix b/flake.nix index 2aa08f3..526d21e 100644 --- a/flake.nix +++ b/flake.nix @@ -76,7 +76,15 @@ inherit inputs outputs; myhostname = "jobb"; }; - modules = [ ./maskiner/jobb/configuration.nix ]; + modules = [ + ( + { nixpkgs, ... }: + { + nixpkgs.overlays = [ overlay-unstable ]; + } + ) + ./maskiner/jobb/configuration.nix + ]; }; work-desktop = nixpkgs.lib.nixosSystem { specialArgs = { diff --git a/maskiner/work-desktop/configuration.nix b/maskiner/work-desktop/configuration.nix index 893d33b..8685b66 100644 --- a/maskiner/work-desktop/configuration.nix +++ b/maskiner/work-desktop/configuration.nix @@ -12,32 +12,108 @@ # You can import other NixOS modules here imports = [ ./hardware-configuration.nix - ../../config/base.nix ../../shared/openssh.nix - ../../jobb/users.nix + ../../config/users.nix + ../../config/dev.nix + ../../config/lsp.nix + ../../config/network.nix + ../../config/system.nix ]; - - environment.systemPackages = with pkgs; [ - kubectl - azure-cli - dotnetCorePackages.sdk_8_0_3xx - k3s - cifs-utils - nfs-utils - docker-slim - ]; - - networking.firewall = { - allowedTCPPorts = [ 5173 ]; + nixpkgs = { + overlays = [ + ]; + config = { + allowUnfree = true; + }; }; - services.k3s.enable = false; + nix.registry = (lib.mapAttrs (_: flake: { inherit flake; })) ( + (lib.filterAttrs (_: lib.isType "flake")) inputs + ); + nix.nixPath = [ "/etc/nix/path" ]; + users.defaultUserShell = pkgs.bash; + documentation.man.generateCaches = false; + programs.fish.enable = true; + programs.bash = { + interactiveShellInit = '' + if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] + then + shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" + exec ${pkgs.fish}/bin/fish $LOGIN_OPTION + fi + ''; + }; + environment.etc = lib.mapAttrs' (name: value: { + name = "nix/path/${name}"; + value.source = value.flake; + }) config.nix.registry; - services.openiscsi = { + nix.settings = { + experimental-features = "nix-command flakes"; + auto-optimise-store = true; + }; + + virtualisation.docker = { enable = true; - name = "iqn.2016-04.com.open-iscsi:work-desktop"; + liveRestore = false; }; + security.rtkit.enable = true; + services = { + tailscale = { + enable = true; + }; + }; + + networking.networkmanager.enable = true; + + environment.sessionVariables = { + EDITOR = "nvim"; + VISUAL = "nvim"; + TERM = "xterm-256color"; + }; + + time.timeZone = "Europe/Stockholm"; + + fonts.packages = with pkgs; [ + nerd-fonts.comic-shanns-mono + nerd-fonts.fira-code + ]; + + i18n.defaultLocale = "en_US.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "sv_SE.UTF-8"; + LC_IDENTIFICATION = "sv_SE.UTF-8"; + LC_MEASUREMENT = "sv_SE.UTF-8"; + LC_MONETARY = "sv_SE.UTF-8"; + LC_NAME = "sv_SE.UTF-8"; + LC_NUMERIC = "sv_SE.UTF-8"; + LC_PAPER = "sv_SE.UTF-8"; + LC_TELEPHONE = "sv_SE.UTF-8"; + LC_TIME = "sv_SE.UTF-8"; + }; + + boot.loader = { + efi = { + canTouchEfiVariables = false; + }; + grub = { + efiSupport = true; + efiInstallAsRemovable = true; + device = "nodev"; + }; + }; + console.keyMap = "sv-latin1"; + + services = { + xserver = { + enable = true; + xkb = { + layout = "se"; + variant = ""; + }; + }; + }; networking.hostName = myhostname; services.xserver.dpi = 140; diff --git a/shared/dunst.nix b/shared/dunst.nix index 08ade48..910ccfa 100644 --- a/shared/dunst.nix +++ b/shared/dunst.nix @@ -8,6 +8,7 @@ global = { width = 300; height = 300; + follow = "keyboard"; offset = "30x50"; origin = "top-right"; transparency = 5; diff --git a/shared/dwm.nix b/shared/dwm.nix index db296c4..7a5df3a 100644 --- a/shared/dwm.nix +++ b/shared/dwm.nix @@ -8,7 +8,7 @@ let dwm = pkgs.dwm.overrideAttrs (old: { src = builtins.fetchGit { url = "https://github.com/FredzyW/dwm-conf.git"; - rev = "e9d94d70c3865a1289c20382df21acc3a138ed88"; + rev = "eaf3279653491212fe9945d41938bfcaba990d64"; }; nativeBuildInputs = with pkgs; [ xorg.libX11.dev diff --git a/shared/openssh.nix b/shared/openssh.nix index 7fdd3c0..ee147b4 100644 --- a/shared/openssh.nix +++ b/shared/openssh.nix @@ -6,6 +6,7 @@ settings = { AuthenticationMethods = "publickey password"; TrustedUserCAKeys = "/etc/ssh/ssh_ca.pub"; + X11Forwarding = true; Banner = "none"; PasswordAuthentication = true; # PasswordAuthentication = false;