diff --git a/hosts/crocoite/crocoite.nix b/hosts/crocoite/crocoite.nix index 8483181..2a403e2 100644 --- a/hosts/crocoite/crocoite.nix +++ b/hosts/crocoite/crocoite.nix @@ -62,6 +62,9 @@ ../../modules/locale.nix ../../modules/networking.nix ../../modules/boot_theming.nix + ../../modules/environment.nix + + ../../modules/users/ranomier.nix ../../modules/specific_hardware/scan_and_print.nix ../../modules/specific_hardware/fwupd.nix @@ -69,7 +72,7 @@ ../../modules/sec_auth/firejail.nix ../../modules/sec_auth/login-manager.nix - ../../modules/sec_auth/users_and_permissions.nix + ../../modules/sec_auth/apparmor.nix ../../modules/sec_auth/ssh.nix ../../modules/software/software.nix @@ -77,6 +80,7 @@ ../../modules/software/game.nix ../../modules/software/audio_video.nix ../../modules/software/obs-studio.nix + ../../modules/software/shell.nix ../../modules/wm_and_de/hyprland.nix diff --git a/modules/sec_auth/users_and_permissions.nix b/modules/environment.nix similarity index 61% rename from modules/sec_auth/users_and_permissions.nix rename to modules/environment.nix index 5d5e922..d399d08 100644 --- a/modules/sec_auth/users_and_permissions.nix +++ b/modules/environment.nix @@ -1,12 +1,4 @@ {pkgs, ...}: { - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.ranomier = { - isNormalUser = true; - description = "Ranomier"; - extraGroups = ["networkmanager" "wheel"]; - #packages = with pkgs; []; - }; - environment.etc = { "xdg/user-dirs.defaults".text = '' DESKTOP=Desktop @@ -37,21 +29,5 @@ # XDG-USER-DIR package and config environment.systemPackages = with pkgs; [ xdg-user-dirs - - apparmor-pam - apparmor-utils - apparmor-parser - apparmor-profiles - roddhjav-apparmor-rules ]; - - security.apparmor.enable = true; - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; } diff --git a/modules/pkg_mgrmnt/flatpak.nix b/modules/pkg_mgrmnt/flatpak.nix index 7af54b5..cf47a56 100644 --- a/modules/pkg_mgrmnt/flatpak.nix +++ b/modules/pkg_mgrmnt/flatpak.nix @@ -1,64 +1,70 @@ {lib, ...}: { - services.flatpak.enable = true; - services.flatpak.update.auto.enable = false; - services.flatpak.uninstallUnmanaged = true; + services.flatpak = { + enable = true; + update.auto = { + enable = false; + onCalendar = "weekly"; + }; + uninstallUnmanaged = true; - services.flatpak.remotes = lib.mkOptionDefault [ - { - name = "flathub-beta"; - location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo"; - } - { - name = "flathub"; - location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; - } - ]; + remotes = [ + { + name = "flathub"; + location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; + args = "--prio=99"; + } + { + name = "flathub-beta"; + location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo"; + } + ]; - services.flatpak.packages = [ - { - origin = "flathub"; - appId = "com.github.tchx84.Flatseal"; - } # flatpak permisssion gui - { - origin = "flathub"; - appId = "com.mojang.Minecraft"; - } # Lego for adults - { - origin = "flathub"; - appId = "de.schmidhuberj.DieBahn"; - } # Public transport connection viewer - { - origin = "flathub"; - appId = "com.github.hugolabe.Wike"; - } # Wikpedia, but in nice - #{ origin = "flathub"; appId = "com.jeffser.Alpaca"; } # Local chat AI - { - origin = "flathub"; - appId = "io.gpt4all.gpt4all"; - } # Local chat AI - { - origin = "flathub"; - appId = "md.obsidian.Obsidian"; - } # note taking and brain organising + packages = [ + { + origin = "flathub"; + appId = "com.github.tchx84.Flatseal"; + } # flatpak permisssion gui + { + origin = "flathub"; + appId = "com.mojang.Minecraft"; + } # Lego for adults + { + origin = "flathub"; + appId = "de.schmidhuberj.DieBahn"; + } # Public transport connection viewer + { + origin = "flathub"; + appId = "com.github.hugolabe.Wike"; + } # Wikpedia, but in nice + #{ origin = "flathub"; appId = "com.jeffser.Alpaca"; } # Local chat AI + { + origin = "flathub"; + appId = "io.gpt4all.gpt4all"; + } # Local chat AI + { + origin = "flathub"; + appId = "md.obsidian.Obsidian"; + } # note taking and brain organising - # messenger - { - origin = "flathub"; - appId = "org.signal.Signal"; - } - { - origin = "flathub"; - appId = "org.telegram.desktop"; - } - { - origin = "flathub"; - appId = "dev.vencord.Vesktop"; - } # More usable discord for linux - { - origin = "flathub"; - appId = "io.github.Soundux"; - } # soundboard + # messenger + { + origin = "flathub"; + appId = "org.signal.Signal"; + } + { + origin = "flathub"; + appId = "org.telegram.desktop"; + } + { + origin = "flathub"; + appId = "dev.vencord.Vesktop"; + } # More usable discord for linux + { + origin = "flathub"; + appId = "io.github.Soundux"; + } # soundboard - #"com.obsproject.Studio" #this is another way to write it - ]; + #"com.obsproject.Studio" #this is another way to write it + ]; + }; } diff --git a/modules/pkg_mgrmnt/podman.nix b/modules/pkg_mgrmnt/podman.nix index 5da164a..ee82a11 100644 --- a/modules/pkg_mgrmnt/podman.nix +++ b/modules/pkg_mgrmnt/podman.nix @@ -15,6 +15,8 @@ }; }; + environment.sessionVariables = { + }; # Useful other development tools environment.systemPackages = with pkgs; [ dive # look into docker image layers diff --git a/modules/sec_auth/apparmor.nix b/modules/sec_auth/apparmor.nix new file mode 100644 index 0000000..dad5775 --- /dev/null +++ b/modules/sec_auth/apparmor.nix @@ -0,0 +1,12 @@ +{pkgs, ...}: { + security.apparmor.enable = true; + + # XDG-USER-DIR package and config + environment.systemPackages = with pkgs; [ + apparmor-pam + apparmor-utils + apparmor-parser + apparmor-profiles + roddhjav-apparmor-rules + ]; +} diff --git a/modules/software/shell.nix b/modules/software/shell.nix new file mode 100644 index 0000000..ad14ac4 --- /dev/null +++ b/modules/software/shell.nix @@ -0,0 +1,4 @@ +{pkgs, ...}: { + programs.zsh.enable = true; + users.defaultUserShell = pkgs.zsh; +} diff --git a/modules/users/ranomier.nix b/modules/users/ranomier.nix new file mode 100644 index 0000000..9bd1e06 --- /dev/null +++ b/modules/users/ranomier.nix @@ -0,0 +1,11 @@ +{pkgs, ...}: { + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.ranomier = { + isNormalUser = true; + description = "Ranomier"; + extraGroups = ["networkmanager" "wheel" "podman"]; + shell = pkgs.zsh; + useDefaultShell = true; + #packages = with pkgs; []; + }; +}