Compare commits

..

14 commits

26 changed files with 277 additions and 180 deletions

34
flake.lock generated
View file

@ -7,27 +7,27 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726989464, "lastModified": 1733050161,
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", "narHash": "sha256-lYnT+EYE47f5yY3KS/Kd4pJ6CO9fhCqumkYYkQ3TK20=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", "rev": "62d536255879be574ebfe9b87c4ac194febf47c5",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-24.05", "ref": "release-24.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"nix-flatpak": { "nix-flatpak": {
"locked": { "locked": {
"lastModified": 1729453639, "lastModified": 1732304879,
"narHash": "sha256-L19R5CXCfTU9IFs9FAaYhDiteegfhJQMiAHLfls4Pdw=", "narHash": "sha256-/DOW8VadE//HA6tuV2++NowYWi7Wa/FmJHXRJoTQnfQ=",
"owner": "gmodena", "owner": "gmodena",
"repo": "nix-flatpak", "repo": "nix-flatpak",
"rev": "68bc646058386e2ffbd9d78d79d6558e684f6b8c", "rev": "c84579946c03c996916be0fb6e1340f444c277af",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -38,11 +38,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1729742320, "lastModified": 1732483221,
"narHash": "sha256-u3Of8xRkN//me8PU+RucKA59/6RNy4B2jcGAF36P4jI=", "narHash": "sha256-kF6rDeCshoCgmQz+7uiuPdREVFuzhIorGOoPXMalL2U=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "e8a2f6d5513fe7b7d15701b2d05404ffdc3b6dda", "rev": "45348ad6fb8ac0e8415f6e5e96efe47dd7f39405",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -54,27 +54,27 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1729973466, "lastModified": 1732350895,
"narHash": "sha256-knnVBGfTCZlQgxY1SgH0vn2OyehH9ykfF8geZgS95bk=", "narHash": "sha256-GcOQbOgmwlsRhpLGSwZJwLbo3pu9ochMETuRSS1xpz4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "cd3e8833d70618c4eea8df06f95b364b016d4950", "rev": "0c582677378f2d9ffcb01490af2f2c678dcb29d3",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-24.05", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1729880355, "lastModified": 1732521221,
"narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=", "narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "18536bf04cd71abd345f9579158841376fdd0c5a", "rev": "4633a7c72337ea8fd23a4f2ba3972865e3ec685d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -2,15 +2,16 @@
###### ######
inputs = { inputs = {
###### ######
#nixpkgs-old.url = "github:NixOS/nixpkgs/nixos-24.05";
# Main nix package repository # Main nix package repository
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
# NixOS unstable channel # NixOS unstable channel
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-24.05"; url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@ -74,8 +75,9 @@
# NixOS configuration entrypoint # NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname' # Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = host_helper "crocoite" # // (host_helper example); nixosConfigurations =
// host_helper "factorio"; host_helper "crocoite" # // (host_helper example);
// host_helper "factorio";
## Standalone home-manager configuration entrypoint ## Standalone home-manager configuration entrypoint
## Available through 'home-manager --flake .#your-username@your-hostname' ## Available through 'home-manager --flake .#your-username@your-hostname'

View file

@ -3,6 +3,8 @@
inputs, inputs,
... ...
}: { }: {
networking.hostName = "crocoite"; # Define your hostname.
#MANPAGER='nvim +Man!' #MANPAGER='nvim +Man!'
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
@ -13,9 +15,6 @@
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment? system.stateVersion = "24.05"; # Did you read the comment?
# Allow unfree packages
#unstable.config.allowUnfree = true;
#nixpkgs.overlays = [ overlays.unstable-packages ]; #nixpkgs.overlays = [ overlays.unstable-packages ];
nixpkgs = { nixpkgs = {
# You can add overlays here # You can add overlays here
@ -41,14 +40,18 @@
allowUnfree = true; allowUnfree = true;
}; };
}; };
networking.hostName = "crocoite"; # Define your hostname.
nix.settings.experimental-features = ["nix-command" "flakes"]; nix = {
settings.experimental-features = ["nix-command" "flakes"];
# https://lix.systems/ Lix is a modern, delicious implementation of the Nix package manager,
# focused on correctness, usability, and growth
# and committed to doing right by its community.
package = pkgs.lix;
channel.enable = false;
};
# https://lix.systems/ Lix is a modern, delicious implementation of the Nix package manager,
# focused on correctness, usability, and growth
# and committed to doing right by its community.
nix.package = pkgs.lix;
imports = [ imports = [
inputs.nix-flatpak.nixosModules.nix-flatpak inputs.nix-flatpak.nixosModules.nix-flatpak
@ -56,36 +59,21 @@
./hardware-configuration.nix ./hardware-configuration.nix
./boot.nix ./boot.nix
../../modules/locale.nix ../../modules
../../modules/networking.nix
../../modules/boot_theming.nix
../../modules/specific_hardware/scan_and_print.nix ../../modules/users
../../modules/specific_hardware/fwupd.nix
../../modules/specific_hardware/bluetooth.nix
../../modules/sec_auth/firejail.nix ../../modules/specific_hardware
../../modules/sec_auth/login-manager.nix
../../modules/sec_auth/users_and_permissions.nix
../../modules/sec_auth/ssh.nix
../../modules/software/software.nix ../../modules/sec_auth
../../modules/software/virt.nix
../../modules/software/game.nix
../../modules/software/audio_video.nix
../../modules/software/obs-studio.nix
../../modules/wm_and_de/hyprland.nix ../../modules/software
../../modules/software/browser
../../modules/software/nix-helper
../../modules/pkg_mgrmnt/flatpak.nix ../../modules/wm_and_de
../../modules/pkg_mgrmnt/podman.nix
../../modules/pkg_mgrmnt/store_pkg_file.nix
../../modules/software/nix-helper/index.nix ../../modules/pkg_mgrmnt
#../../modules/software/nix-helper/doc.nix
../../modules/software/nix-helper/nix-ld.nix
../../modules/software/browser/firefox.nix
../../modules/software/browser/brave.nix
]; ];
} }

View file

@ -12,7 +12,7 @@
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = ["nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = ["nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = []; boot.extraModulePackages = [];

View file

@ -1,26 +1,30 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/profiles/qemu-guest.nix") lib,
]; pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ ]; boot.kernelModules = [];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/a6c22dab-a82a-4109-a8d0-b7ed99d56bc7"; device = "/dev/disk/by-uuid/a6c22dab-a82a-4109-a8d0-b7ed99d56bc7";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = swapDevices = [
[ { device = "/dev/disk/by-uuid/ca4eedce-6e52-4593-a188-a48e54074d14"; } {device = "/dev/disk/by-uuid/ca4eedce-6e52-4593-a188-a48e54074d14";}
]; ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (the default) this is the recommended approach. When using systemd-networkd it's
@ -31,4 +35,3 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
} }

8
modules/default.nix Normal file
View file

@ -0,0 +1,8 @@
{ ... }: {
imports = [
./boot_theming.nix
./environment.nix
./locale.nix
./networking.nix
];
}

View file

@ -1,12 +1,4 @@
{pkgs, ...}: { {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 = { environment.etc = {
"xdg/user-dirs.defaults".text = '' "xdg/user-dirs.defaults".text = ''
DESKTOP=Desktop DESKTOP=Desktop
@ -37,21 +29,5 @@
# XDG-USER-DIR package and config # XDG-USER-DIR package and config
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
xdg-user-dirs 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;
# };
} }

View file

@ -0,0 +1,7 @@
{ ... }: {
imports = [
./flatpak.nix
./podman.nix
./store_pkg_file.nix
];
}

View file

@ -1,64 +1,23 @@
{lib, ...}: { { ... }: {
services.flatpak.enable = true; services.flatpak = {
services.flatpak.update.auto.enable = false; enable = true;
services.flatpak.uninstallUnmanaged = true; update.auto = {
enable = false;
onCalendar = "weekly";
};
uninstallUnmanaged = true;
services.flatpak.remotes = lib.mkOptionDefault [ remotes = [
{ {
name = "flathub-beta"; name = "flathub";
location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo"; location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
} args = "--prio=99";
{ }
name = "flathub"; {
location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; 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
# 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
];
} }

View file

@ -15,6 +15,8 @@
}; };
}; };
environment.sessionVariables = {
};
# Useful other development tools # Useful other development tools
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
dive # look into docker image layers dive # look into docker image layers

View file

@ -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
];
}

View file

@ -0,0 +1,8 @@
{ ... }: {
imports = [
./apparmor.nix
./firejail.nix
./login-manager.nix
./ssh.nix
];
}

View file

@ -3,18 +3,14 @@
programs.firejail = { programs.firejail = {
enable = true; enable = true;
wrappedBinaries = { wrappedBinaries = {
firefox = { nuclear = {
executable = "${pkgs.firefox}/bin/firefox"; executable = "${pkgs.nuclear}/bin/nuclear";
profile = "${pkgs.firejail}/etc/firejail/firefox.profile"; profile = "${pkgs.firejail}/etc/firejail/nuclear.profile";
extraArgs = [ extraArgs = [
# Required for U2F USB stick
"--ignore=private-dev"
# Enforce dark mode # Enforce dark mode
"--env=GTK_THEME=Adwaita:dark" "--env=GTK_THEME=Adwaita:dark"
# Enable system notifications # Enable system notifications
"--dbus-user.talk=org.freedesktop.Notifications" "--dbus-user.talk=org.freedesktop.Notifications"
# For screen sharing
"--dbus-user.talk=org.freedesktop.portal.*"
]; ];
}; };
@ -33,14 +29,33 @@
]; ];
}; };
nuclear = { firefox = {
executable = "${pkgs.nuclear}/bin/nuclear"; executable = "${pkgs.firefox}/bin/firefox";
profile = "${pkgs.firejail}/etc/firejail/nuclear.profile"; profile = "${pkgs.firejail}/etc/firejail/firefox.profile";
extraArgs = [ extraArgs = [
# Required for U2F USB stick
"--ignore=private-dev"
# Enforce dark mode # Enforce dark mode
"--env=GTK_THEME=Adwaita:dark" "--env=GTK_THEME=Adwaita:dark"
# Enable system notifications # Enable system notifications
"--dbus-user.talk=org.freedesktop.Notifications" "--dbus-user.talk=org.freedesktop.Notifications"
# For screen sharing
"--dbus-user.talk=org.freedesktop.portal.*"
];
};
nyxt = {
executable = "${pkgs.nyxt}/bin/nyxt";
profile = "${pkgs.firejail}/etc/firejail/chromium-browser.profile";
extraArgs = [
# Required for U2F USB stick
"--ignore=private-dev"
# Enforce dark mode
"--env=GTK_THEME=Adwaita:dark"
# Enable system notifications
"--dbus-user.talk=org.freedesktop.Notifications"
# For screen sharing
"--dbus-user.talk=org.freedesktop.portal.*"
]; ];
}; };

View file

@ -6,13 +6,13 @@
vt = 7; vt = 7;
settings = { settings = {
default_session = { default_session = {
command = ''${pkgs.greetd.tuigreet}/bin/tuigreet \ command = '' ${pkgs.greetd.tuigreet}/bin/tuigreet \
--time \ --time \
--time-format '%Y-%m-%dT%H:%M:%S %A' \ --time-format '%Y-%m-%dT%H:%M:%S %A' \
--remember \ --remember \
--user-menu \ --user-menu \
--theme 'border=lightgreen;text=lightgreen;prompt=lightgreen;time=lightgreen;action=lightgreen;button=lightgreen;input=lightgreen' \ --theme 'border=lightgreen;text=lightgreen;prompt=lightgreen;time=lightgreen;action=lightgreen;button=lightgreen;input=lightgreen' \
--cmd Hyprland''; --cmd Hyprland'';
# removed elements from theme: container # removed elements from theme: container
user = "greeter"; user = "greeter";
}; };

View file

@ -0,0 +1,7 @@
{ ... }: {
imports = [
./brave.nix
./firefox.nix
./nyxt.nix
];
}

View file

@ -0,0 +1,5 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
nyxt
];
}

View file

@ -0,0 +1,11 @@
{ ... }: {
imports = [
./audio_video.nix
./flatpak.nix
./game.nix
./obs-studio.nix
./shell.nix
./software.nix
./virt.nix
];
}

View file

@ -0,0 +1,51 @@
{ ... }: {
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
# 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
];
};
}

View file

@ -0,0 +1,7 @@
{ ... }: {
imports = [
#./doc.nix
./index.nix
./nix-ld.nix
];
}

View file

@ -0,0 +1,4 @@
{pkgs, ...}: {
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
}

View file

@ -2,8 +2,6 @@
# also opens the TCP and UDP port from 1714 to 1764 # also opens the TCP and UDP port from 1714 to 1764
programs.kdeconnect.enable = true; programs.kdeconnect.enable = true;
environment.pathsToLink = ["/share/foot"];
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = let environment.systemPackages = let
@ -43,6 +41,7 @@
htop htop
ncdu ncdu
wget wget
unstable.yt-dlp
miniserve miniserve
file file
unzip unzip
@ -50,9 +49,10 @@
ripgrep ripgrep
qemu qemu
home-manager home-manager
dfc
# move to homemanager? # move to homemanager?
mumble unstable.mumble
amberol_wrapper amberol_wrapper
amberol amberol
nuclear nuclear
@ -63,11 +63,13 @@
keepassxc keepassxc
#minecraft #minecraft
element-desktop element-desktop
rustdesk
timer
]; ];
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
noto-fonts noto-fonts
noto-fonts-cjk noto-fonts-cjk-sans
noto-fonts-emoji noto-fonts-emoji
liberation_ttf liberation_ttf
dina-font dina-font

View file

@ -0,0 +1,7 @@
{ ... }: {
imports = [
./bluetooth.nix
./fwupd.nix
./scan_and_print.nix
];
}

View file

@ -0,0 +1,5 @@
{ ... }: {
imports = [
./ranomier.nix
];
}

View file

@ -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; [];
};
}

View file

@ -0,0 +1,5 @@
{ ... }: {
imports = [
./hyprland.nix
];
}

View file

@ -44,6 +44,8 @@
style = "kvantum"; style = "kvantum";
}; };
environment.pathsToLink = ["/share/foot"];
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -56,7 +58,7 @@
pamixer pamixer
waybar waybar
hyprpaper hyprpaper
kanshi unstable.kanshi
dunst dunst
# audio # audio
@ -81,6 +83,6 @@
lxqt.lxqt-policykit lxqt.lxqt-policykit
# file manager # file manager
gnome.nautilus nautilus
]; ];
} }