diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2024-11-14 12:05:09 -0500 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2024-11-14 12:05:09 -0500 |
commit | 3727e7bd79fe75ff18b1dc6af494dbda940e0971 (patch) | |
tree | 8c4fa53308b74063b4262605a02fcda07cd14d21 |
Batman
-rw-r--r-- | common/dropbox.nix | 9 | ||||
-rw-r--r-- | common/main-user.nix | 44 | ||||
-rw-r--r-- | common/services.nix | 18 | ||||
-rw-r--r-- | common/ssh.nix | 16 | ||||
-rw-r--r-- | flake.lock | 506 | ||||
-rw-r--r-- | flake.nix | 32 | ||||
-rw-r--r-- | hosts/battlestation/configuration.nix | 155 | ||||
-rw-r--r-- | hosts/battlestation/hardware-configuration.nix | 92 | ||||
-rw-r--r-- | software/common.nix | 71 | ||||
-rw-r--r-- | software/development.nix | 52 | ||||
-rw-r--r-- | software/entertainment.nix | 14 | ||||
-rw-r--r-- | software/office.nix | 0 | ||||
-rw-r--r-- | software/windowmanager.nix | 68 |
13 files changed, 1077 insertions, 0 deletions
diff --git a/common/dropbox.nix b/common/dropbox.nix new file mode 100644 index 0000000..8076610 --- /dev/null +++ b/common/dropbox.nix @@ -0,0 +1,9 @@ +{environment, pkgs, programs, ...}: + +{ + environment.systemPackages = with pkgs; [ + pass + maestral + maestral-gui + ]; +} diff --git a/common/main-user.nix b/common/main-user.nix new file mode 100644 index 0000000..4219b67 --- /dev/null +++ b/common/main-user.nix @@ -0,0 +1,44 @@ +{lib, config, pkgs, programs, environment, ...}: + +let + cfg = config.main-user; +in +{ + + options.main-user = { + enable = lib.mkEnableOption "enable user module"; + userName = lib.mkOption { + default = "master"; + description = '' + username + ''; + }; + }; + + config = lib.mkIf config.main-user.enable { + + + programs.zsh.enable = true; + + users.groups.plugdev = {}; + users.users.${config.main-user.userName} = { + isNormalUser = true; + initialPassword = "password1324"; + description = "Benjamin Chausse"; + group = "wheel"; + extraGroups = ["plugdev" "networkmanager" "docker" "mlocate"]; + shell = pkgs.zsh; + }; + + environment.systemPackages = with pkgs; [ + git + yadm + neovim + zsh + zsh-syntax-highlighting + ]; + + }; +} + + diff --git a/common/services.nix b/common/services.nix new file mode 100644 index 0000000..7ed9bec --- /dev/null +++ b/common/services.nix @@ -0,0 +1,18 @@ +{virtualisation, environment, pkgs, services, ...}: + +{ + virtualisation.docker = { + enable = true; + liveRestore = false; + }; + environment.systemPackages = with pkgs; [ + lazydocker + ]; + + services.plex = { + enable = true; + openFirewall = true; + user="master"; + accelerationDevices = ["*"]; + }; +} diff --git a/common/ssh.nix b/common/ssh.nix new file mode 100644 index 0000000..de931f5 --- /dev/null +++ b/common/ssh.nix @@ -0,0 +1,16 @@ +{services, networking, ...}: + +{ + services.openssh = { + enable = true; + ports = [ 22 ]; + settings = { + PasswordAuthentication = true; + AllowUsers = null; # Allows all users by default. Can be [ "user1" "user2" ] + UseDns = true; + X11Forwarding = false; + PermitRootLogin = "no"; # "yes", "without-password", "prohibit-password", "forced-commands-only", "no" + }; + }; + # networking.firewall.allowedTCPPorts = [22]; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..42c1654 --- /dev/null +++ b/flake.lock @@ -0,0 +1,506 @@ +{ + "nodes": { + "aquamarine": { + "inputs": { + "hyprutils": [ + "xremap-flake", + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "xremap-flake", + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "xremap-flake", + "hyprland", + "nixpkgs" + ], + "systems": [ + "xremap-flake", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1725753098, + "narHash": "sha256-/NO/h/qD/eJXAQr/fHA4mdDgYsNT9thHQ+oT6KPi2ac=", + "owner": "hyprwm", + "repo": "aquamarine", + "rev": "e4a13203112a036fc7f437d391c7810f3dd5ab52", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "aquamarine", + "type": "github" + } + }, + "crane": { + "locked": { + "lastModified": 1725409566, + "narHash": "sha256-PrtLmqhM6UtJP7v7IGyzjBFhbG4eOAHT6LPYOFmYfbk=", + "owner": "ipetkov", + "repo": "crane", + "rev": "7e4586bad4e3f8f97a9271def747cf58c4b68f3c", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "devshell": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1722113426, + "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=", + "owner": "numtide", + "repo": "devshell", + "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1726153070, + "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1726440980, + "narHash": "sha256-ChhIrjtdu5d83W+YDRH+Ec5g1MmM0xk6hJnkz15Ot7M=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "a9c9cc6e50f7cbd2d58ccb1cd46a1e06e9e445ff", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "hyprcursor": { + "inputs": { + "hyprlang": [ + "xremap-flake", + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "xremap-flake", + "hyprland", + "nixpkgs" + ], + "systems": [ + "xremap-flake", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1722623071, + "narHash": "sha256-sLADpVgebpCBFXkA1FlCXtvEPu1tdEsTfqK1hfeHySE=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "912d56025f03d41b1ad29510c423757b4379eb1c", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "aquamarine": "aquamarine", + "hyprcursor": "hyprcursor", + "hyprlang": "hyprlang", + "hyprutils": "hyprutils", + "hyprwayland-scanner": "hyprwayland-scanner", + "nixpkgs": "nixpkgs_4", + "systems": "systems", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1726430622, + "narHash": "sha256-RN7CoPxYtyl+PVhMYKOp6o8c/n/NhKI2ILscu7jRwxo=", + "owner": "hyprwm", + "repo": "Hyprland", + "rev": "9e356562446f44c471ae38a80506a9df039305d6", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "Hyprland", + "type": "github" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "xremap-flake", + "hyprland", + "xdph", + "nixpkgs" + ], + "systems": [ + "xremap-flake", + "hyprland", + "xdph", + "systems" + ] + }, + "locked": { + "lastModified": 1721326555, + "narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "hyprutils": [ + "xremap-flake", + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "xremap-flake", + "hyprland", + "nixpkgs" + ], + "systems": [ + "xremap-flake", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1725997860, + "narHash": "sha256-d/rZ/fHR5l1n7PeyLw0StWMNLXVU9c4HFyfskw568so=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "dfeb5811dd6485490cce18d6cc1e38a055eea876", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "xremap-flake", + "hyprland", + "nixpkgs" + ], + "systems": [ + "xremap-flake", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1724966483, + "narHash": "sha256-WXDgKIbzjYKczxSZOsJplCS1i1yrTUpsDPuJV/xpYLo=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "8976e3f6a5357da953a09511d0c7f6a890fb6ec2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "xremap-flake", + "hyprland", + "nixpkgs" + ], + "systems": [ + "xremap-flake", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1721324119, + "narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1731139594, + "narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1725233747, + "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1722073938, + "narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e36e9f57337d0ff0cf77aceb58af4c805472bfae", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1726062873, + "narHash": "sha256-IiA3jfbR7K/B5+9byVi9BZGWTD4VSbWe8VLpp9B/iYk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4f807e8940284ad7925ebd0a0993d2a1791acb2f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1725983898, + "narHash": "sha256-4b3A9zPpxAxLnkF9MawJNHDtOOl6ruL0r6Og1TEDGCE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1355a0cbfeac61d785b7183c0caaec1f97361b43", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1726481836, + "narHash": "sha256-MWTBH4dd5zIz2iatDb8IkqSjIeFum9jAqkFxgHLdzO4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "20f9370d5f588fb8c72e844c54511cab054b5f40", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1725103162, + "narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "xremap-flake": "xremap-flake" + } + }, + "systems": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1725271838, + "narHash": "sha256-VcqxWT0O/gMaeWTTjf1r4MOyG49NaNxW4GHTO3xuThE=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "9fb342d14b69aefdf46187f6bb80a4a0d97007cd", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "xdph": { + "inputs": { + "hyprland-protocols": "hyprland-protocols", + "hyprlang": [ + "xremap-flake", + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "xremap-flake", + "hyprland", + "nixpkgs" + ], + "systems": [ + "xremap-flake", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1726046979, + "narHash": "sha256-6SEsjurq9cdTkITA6d49ncAJe4O/8CgRG5/F//s6Xh8=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "e695669fd8e1d1be9eaae40f35e00f8bd8b64c18", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } + }, + "xremap": { + "flake": false, + "locked": { + "lastModified": 1726457781, + "narHash": "sha256-+kSb1FV1kJyrxfITSRGJp0ja4icGdNQKkwPdq6rzNps=", + "owner": "k0kubun", + "repo": "xremap", + "rev": "a9b52ccda117dd65468727787b19fbd8bf2915fd", + "type": "github" + }, + "original": { + "owner": "k0kubun", + "ref": "v0.10.1", + "repo": "xremap", + "type": "github" + } + }, + "xremap-flake": { + "inputs": { + "crane": "crane", + "devshell": "devshell", + "flake-parts": "flake-parts", + "home-manager": "home-manager", + "hyprland": "hyprland", + "nixpkgs": "nixpkgs_5", + "treefmt-nix": "treefmt-nix", + "xremap": "xremap" + }, + "locked": { + "lastModified": 1726701848, + "narHash": "sha256-NBGchlI3+dg3cHAFP+PKWlysW3a88y83XKnthLAmDns=", + "owner": "xremap", + "repo": "nix-flake", + "rev": "2c55335d6509702b0d337b8da697d7048e36123d", + "type": "github" + }, + "original": { + "owner": "xremap", + "repo": "nix-flake", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f307af3 --- /dev/null +++ b/flake.nix @@ -0,0 +1,32 @@ +{ + description = "Nixos config flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + + # home-manager = { + # url = "github:nix-community/home-manager"; + # inputs.nixpkgs.follows = "nixpkgs"; + # }; + xremap-flake.url = "github:xremap/nix-flake"; + }; + + outputs = { self, nixpkgs, ... }@inputs: { + nixosConfigurations = { + battlestation = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs;}; + modules = [ + ./hosts/battlestation/configuration.nix + # inputs.home-manager.nixosModules.default + ]; + }; + laptop = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs;}; + modules = [ + ./hosts/laptop/configuration.nix + # inputs.home-manager.nixosModules.default + ]; + }; + }; + }; +} diff --git a/hosts/battlestation/configuration.nix b/hosts/battlestation/configuration.nix new file mode 100644 index 0000000..e97ee83 --- /dev/null +++ b/hosts/battlestation/configuration.nix @@ -0,0 +1,155 @@ +# 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, pkgs, inputs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ../../common/main-user.nix + ../../common/services.nix + ../../software/common.nix + ../../software/windowmanager.nix + ../../software/entertainment.nix + ../../software/development.nix + ../../common/dropbox.nix + ../../common/ssh.nix + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + # boot.kernelParams = ["video=DP-1:3840x2160@60e" "video=DP-2:d"]; + + networking.hostName = "battlestation"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "America/Toronto"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_CA.UTF-8"; + + # Enable the X11 windowing system. + # You can disable this if you're only using the Wayland session. + services.xserver.enable = true; + + # Enable the KDE Plasma Desktop Environment. + # services.displayManager.sddm.enable = true; + + # services.displayManager.ly.enable = true; + + services.greetd = { + enable = true; + restart = false; + settings = { + default_session = { + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd river"; + user = "master"; + }; + initial_session = { + command = "river"; + user = "master"; + }; + }; + }; + + services.desktopManager.plasma6.enable = false; + + # Keep shebangs working + services.envfs.enable = true; + + # Configure keymap in X11 + services.xserver.xkb = { + layout = "us"; + variant = ""; + }; + + # Enable CUPS to print documents. + services.printing.enable = false; + + # Enable sound with pipewire. + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + # media-session.enable = true; + }; + + # Enable touchpad support (enabled default in most desktopManager). + # services.xserver.libinput.enable = true; + + +main-user.enable = true; +main-user.userName = "master"; + +# default shell for all users +programs.zsh.enable = true; +users.defaultUserShell = pkgs.zsh; + + # Install firefox. + programs.firefox.enable = true; + + # Make neovim default + programs.neovim = { + enable = true; + defaultEditor = true; + vimAlias = true; + }; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + killall + neovim + zsh + # wget + ]; + + # 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; + # }; + + # List services that you want to enable: + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "24.05"; # Did you read the comment? + +} diff --git a/hosts/battlestation/hardware-configuration.nix b/hosts/battlestation/hardware-configuration.nix new file mode 100644 index 0000000..ed28aa5 --- /dev/null +++ b/hosts/battlestation/hardware-configuration.nix @@ -0,0 +1,92 @@ +# 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. +{ virtualisation, config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/957b4b6c-f5cc-43bf-9afd-f801a8af7f3a"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/42C6-5222"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + "/games" = { + device = "/dev/disk/by-uuid/430933bb-e59a-4b17-9b93-7fbd6be0c4f9"; + fsType = "ext4"; + }; + "/vault" = { + device = "/dev/disk/by-uuid/0b5fd130-25ef-4839-858a-5f1ddeeb4b9b"; + fsType = "ext4"; + }; + "/music" = { + device = "/dev/disk/by-uuid/5EA2937CA293577D"; + fsType = "ntfs-3g"; + options = [ "rw" "uid=1000" ]; + }; + "/wingames" = { + device = "/dev/disk/by-uuid/209EC7D39EC7A020"; + fsType = "ntfs-3g"; + options = [ "rw" "uid=1000" ]; + }; + "/nvme" = { + device = "/dev/disk/by-uuid/880751ef-378e-45e4-892a-1086bb2be140"; + fsType = "ext4"; + }; + }; + + swapDevices = [ ]; + + # Make docker work on "/" + virtualisation.docker.storageDriver = "btrfs"; + + # 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.<interface>.useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware = { + cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + graphics.enable = true; + nvidia = { + modesetting.enable = true; + powerManagement.enable = false; + powerManagement.finegrained = false; + open = true; + nvidiaSettings = true; + }; + + bluetooth.enable = true; + bluetooth.powerOnBoot = true; + + }; + services.xserver.videoDrivers = ["nvidia"]; + + environment.systemPackages = with pkgs; [ + openrgb + ]; + services.hardware.openrgb = { + enable = true; + package = pkgs.openrgb; + motherboard = "intel"; + }; + +} diff --git a/software/common.nix b/software/common.nix new file mode 100644 index 0000000..bec9424 --- /dev/null +++ b/software/common.nix @@ -0,0 +1,71 @@ +{environment, pkgs, services, programs, ...}: + +{ + environment.systemPackages = with pkgs; [ + bluetuith + zathura + firefox + mpv + imv + btop + mlocate + + # File Manager and it's preview stuff + lf + file + poppler_utils # for pdftocairo + chafa # for sixels + lynx # for html + imagemagick # for convert + ffmpegthumbnailer # for video thumbnails + atool # for archives + odt2txt # for libreoffice previews + xlsx2csv # for excel + libwebp # for webp images + djvulibre # for dejaVu + mediainfo # audio file info + bat # cute cat + + # compression/decompression tools + zip + unzip + p7zip + + vesktop # wayland friendly discord client + + obsidian + ripgrep + + # Run windows apps with linux + winetricks + wineWowPackages.staging + + ]; + + programs.nix-ld = { + enable = true; + libraries = with pkgs; [ + + # Needed for scarlett-mixer + pango + cairo + glib + gtk4 + gtk3 + dbus-glib + gobject-introspection + harfbuzz + libGL + libGLU + alsa-lib + xorg.libX11 + + ]; + }; + services.pcscd.enable = true; + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + +} diff --git a/software/development.nix b/software/development.nix new file mode 100644 index 0000000..3a47e26 --- /dev/null +++ b/software/development.nix @@ -0,0 +1,52 @@ +{environment, xdg, pkgs, programs, ...}: + +{ + environment.systemPackages = with pkgs; [ + git + git-lfs + gnumake + cmake + zig + go + dig + ]; + + programs.nix-ld = { + enable = true; + libraries = with pkgs; [ + gopls + gofumpt + golangci-lint-langserver + + lua + + libclang + clang-tools + bear + glibc + gcc + + nodejs + + # Tools + ripgrep + fzf + entr + tmux + openssh + rsync + python3 + unzip + p7zip + + icu # unicode globalization for marksman lsp + + docker + docker-compose + nvidia-container-toolkit + + hugo + ]; + }; + +} diff --git a/software/entertainment.nix b/software/entertainment.nix new file mode 100644 index 0000000..b64747b --- /dev/null +++ b/software/entertainment.nix @@ -0,0 +1,14 @@ +{programs, environment, pkgs, ...}: + +{ + # Main packages + environment.systemPackages = with pkgs; []; + + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + localNetworkGameTransfers.openFirewall = true; + }; + +} diff --git a/software/office.nix b/software/office.nix new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/software/office.nix diff --git a/software/windowmanager.nix b/software/windowmanager.nix new file mode 100644 index 0000000..d43b9fe --- /dev/null +++ b/software/windowmanager.nix @@ -0,0 +1,68 @@ +{environment, xdg, pkgs, services, ...}: + +{ + # Main packages + environment.systemPackages = with pkgs; [ + # Fonts + fontconfig + fira-code-nerdfont + libertinus + + kanshi # auto-configure monitors on connect/disconnect + + river # wm + lua # river config + luajitPackages.luaposix + + foot # terminal + tofi # launcher (dmenu-like) + swaybg # wallpaper + waybar # bar + wev # detect inputs + + cronie + + tmux # for my homemade dropdowns + + # Screenshots + grim + slurp + + dunst # notifications + libnotify + wl-clipboard # copy/paste + + wlr-randr # detect monitors + wdisplays # arrange monitors + jq # parse wlr-randr json output + + pulsemixer # adjust audio + playerctl # control next/previous song + glib # for gdbus needed by volumectl + ]; + + # Screen capture/sharing: + xdg.portal = { + enable = true; + xdgOpenUsePortal = true; + config = { + common = { + default = ["wlr"]; + }; + }; + wlr = { + enable = true; + settings = { + screencast = { + max_fps = 30; + chooser_type = "simple"; + chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or"; + }; + }; + }; + }; + + # Force wayland on electron + environment.sessionVariables.NIXOS_OZONE_WL = "1"; + +} |