This commit is contained in:
cnst
2024-06-22 17:05:40 +02:00
parent e23b7b484a
commit bd872d5985
4 changed files with 127 additions and 72 deletions

87
flake.lock generated
View File

@@ -69,6 +69,22 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
@@ -143,11 +159,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717664902, "lastModified": 1718879355,
"narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=", "narHash": "sha256-RTyqP4fBX2MdhNuMP+fnR3lIwbdtXhyj7w7fwtvgspc=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1", "rev": "8cd35b9496d21a6c55164d8547d9d5280162b07a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -208,11 +224,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1718788307, "lastModified": 1719037157,
"narHash": "sha256-SqiOz0sljM0GjyQEVinPXQxaGcbOXw5OgpCWGPgh/vo=", "narHash": "sha256-aOKd8+mhBsLQChCu1mn/W5ww79ta5cXVE59aJFrifM8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "d7830d05421d0ced83a0f007900898bdcaf2a2ca", "rev": "cd886711998fe5d9ff7979fdd4b4cbd17b1f1511",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -230,11 +246,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1718526747, "lastModified": 1718788307,
"narHash": "sha256-sKrD/utGvmtQALvuDj4j0CT3AJXP1idOAq2p+27TpeE=", "narHash": "sha256-SqiOz0sljM0GjyQEVinPXQxaGcbOXw5OgpCWGPgh/vo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "0a7ffb28e5df5844d0e8039c9833d7075cdee792", "rev": "d7830d05421d0ced83a0f007900898bdcaf2a2ca",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -325,35 +341,21 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1718714799,
"narHash": "sha256-FUZpz9rg3gL8NVPKbqU8ei1VkPLsTIfAJ2fdAf5qjak=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c00d587b1a1afbf200b1d8f0b0e4ba9deb1c7f0e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": { "nixvim": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_2", "nixpkgs": [
"nixpkgs"
],
"nixvim": "nixvim_2", "nixvim": "nixvim_2",
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
}, },
"locked": { "locked": {
"lastModified": 1718967624, "lastModified": 1719068614,
"narHash": "sha256-Qu6w2uxdiRIRMpXbF6ItKeDrZzAelR6e8rnnJQTLtl8=", "narHash": "sha256-XTVc7z7HJiX1j4zVCm9+V3223f4FQuNt5lZKgOeMzNA=",
"owner": "cnsta", "owner": "cnsta",
"repo": "cnixvim", "repo": "cnixvim",
"rev": "8e3ce2ad4b703f36e4fc74ef86a4601fc727f71b", "rev": "ef0e10e815060ff243ba85d56f63e84f434d2717",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -377,11 +379,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1718869672, "lastModified": 1719042662,
"narHash": "sha256-artyEBzWUsNXtYj7jBr816wRJj2Y3DYDHw6ECrQotX0=", "narHash": "sha256-xwj8hxu02myIPkNsch/v2NbxuRmuvlcphrbYPECE49c=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "744dfea48bdd331e66b9e874822559fa6fae98af", "rev": "49452662b7b4dd2467cbac19e0f9820d570d8976",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -420,9 +422,30 @@
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"nixvim": "nixvim", "nixvim": "nixvim",
"solaar": "solaar",
"systems": "systems_2" "systems": "systems_2"
} }
}, },
"solaar": {
"inputs": {
"flake-compat": "flake-compat_4",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1715955760,
"narHash": "sha256-XM9hLLKwEoQvwXZHbBSqYnra2xScO3YQ19Cv4KmO+0A=",
"rev": "1564bf36b610f25468284c1bdb6e6e6325d21226",
"revCount": 35,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/Svenum/Solaar-Flake/1.1.13/018f86f0-9d39-7328-9e18-a3e0231bc256/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/Svenum/Solaar-Flake/%2A.tar.gz"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,

View File

@@ -5,10 +5,15 @@
# Nixpkgs # Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
# Solaar
solaar = {
url = "https://flakehub.com/f/Svenum/Solaar-Flake/*.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
# Nixvim # Nixvim
nixvim = { nixvim = {
url = "github:cnsta/cnixvim"; url = "github:cnsta/cnixvim";
inputs.nixpkgs.follows = "nixpkgs";
}; };
# Home manager # Home manager
home-manager = { home-manager = {
@@ -21,6 +26,7 @@
nixpkgs, nixpkgs,
home-manager, home-manager,
systems, systems,
solaar,
... ...
} @ inputs: let } @ inputs: let
inherit (self) outputs; inherit (self) outputs;
@@ -40,18 +46,10 @@
cnix = nixpkgs.lib.nixosSystem { cnix = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;}; specialArgs = {inherit inputs outputs;};
# > Our main nixos configuration file < # > Our main nixos configuration file <
modules = [./nixos/configuration.nix]; modules = [
}; solaar.nixosModules.default
}; ./nixos/configuration.nix
];
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"cnst@cnix" = home-manager.lib.homeManagerConfiguration {
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
# > Our main home-manager configuration file <
modules = [./home-manager/home.nix];
}; };
}; };
}; };

View File

@@ -62,7 +62,6 @@
gvfs gvfs
swaybg swaybg
wireguard-tools wireguard-tools
solaar
wpa_supplicant wpa_supplicant
ntfs3g ntfs3g
xdg-utils xdg-utils
@@ -84,6 +83,7 @@
gruvbox-gtk-theme gruvbox-gtk-theme
mullvad-vpn mullvad-vpn
thefuck thefuck
calcurse
]; ];
# Hyprland & accessories # Hyprland & accessories
@@ -127,8 +127,10 @@
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
shellAliases = { shellAliases = {
nixconfig = "cd /home/cnst/.nix-config/";
ll = "ls -l"; ll = "ls -l";
update = "sudo nixos-rebuild switch"; nixupdate = "sudo nixos-rebuild switch --flake .#cnix";
flakeupdate = "nix flake update";
}; };
history = { history = {
size = 10000; size = 10000;

View File

@@ -2,6 +2,7 @@
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix) # Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{ {
inputs, inputs,
outputs,
lib, lib,
config, config,
pkgs, pkgs,
@@ -10,6 +11,7 @@
}: { }: {
# You can import other NixOS modules here # You can import other NixOS modules here
imports = [ imports = [
inputs.home-manager.nixosModules.home-manager
# If you want to use modules from other flakes (such as nixos-hardware): # If you want to use modules from other flakes (such as nixos-hardware):
# inputs.hardware.nixosModules.common-cpu-amd # inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd # inputs.hardware.nixosModules.common-ssd
@@ -21,6 +23,14 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
home-manager = {
extraSpecialArgs = {inherit inputs outputs;};
users = {
# Import your home-manager configuration
cnst = import ../home-manager/home.nix;
};
};
nixpkgs = { nixpkgs = {
# You can add overlays here # You can add overlays here
overlays = [ overlays = [
@@ -76,6 +86,9 @@
pkgs.curl pkgs.curl
pkgs.ripgrep pkgs.ripgrep
pkgs.nixd pkgs.nixd
pkgs.python312Packages.oauth2
pkgs.python312Packages.httplib2
pkgs.killall
]; ];
localBinInPath = true; localBinInPath = true;
}; };
@@ -89,35 +102,51 @@
jetbrains-mono jetbrains-mono
(nerdfonts.override {fonts = ["JetBrainsMono" "FiraCode" "Iosevka" "3270" "DroidSansMono"];}) (nerdfonts.override {fonts = ["JetBrainsMono" "FiraCode" "Iosevka" "3270" "DroidSansMono"];})
]; # Bootloader ]; # Bootloader
boot.loader.systemd-boot.enable = true; boot.loader = {
boot.loader.efi.canTouchEfiVariables = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
# Enable networking # Enable networking
networking.networkmanager.enable = true; networking = {
# TODO: Set your hostname networkmanager.enable = true;
networking.hostName = "cnix"; hostName = "cnix";
};
# Enable sound with pipewire. # Enable sound with pipewire.
hardware = { hardware = {
pulseaudio.enable = false; pulseaudio.enable = false;
bluetooth = {
enable = true;
powerOnBoot = true;
};
graphics = { graphics = {
enable = true; enable = true;
}; };
}; };
zramSwap.enable = true;
security.rtkit.enable = true; security.rtkit.enable = true;
programs = { programs = {
solaar.enable = true;
hyprland = { hyprland = {
enable = true; enable = true;
xwayland.enable = true; xwayland.enable = true;
}; };
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
zsh.enable = true; zsh.enable = true;
}; };
# Time zone & Locale # Time zone & Locale
time.timeZone = "Europe/Stockholm"; time.timeZone = "Europe/Stockholm";
i18n.defaultLocale = "en_US.UTF-8"; i18n = {
defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = { extraLocaleSettings = {
LC_ADDRESS = "sv_SE.UTF-8"; LC_ADDRESS = "sv_SE.UTF-8";
LC_IDENTIFICATION = "sv_SE.UTF-8"; LC_IDENTIFICATION = "sv_SE.UTF-8";
LC_MEASUREMENT = "sv_SE.UTF-8"; LC_MEASUREMENT = "sv_SE.UTF-8";
@@ -128,6 +157,7 @@
LC_TELEPHONE = "sv_SE.UTF-8"; LC_TELEPHONE = "sv_SE.UTF-8";
LC_TIME = "sv_SE.UTF-8"; LC_TIME = "sv_SE.UTF-8";
}; };
};
# Console keymap # Console keymap
console.useXkbConfig = true; console.useXkbConfig = true;
@@ -137,18 +167,18 @@
cnst = { cnst = {
isNormalUser = true; isNormalUser = true;
shell = pkgs.zsh; shell = pkgs.zsh;
openssh.authorizedKeys.keys = [ # openssh.authorizedKeys.keys = [];
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect
];
# TODO: Be sure to add any other groups you need (such as networkmanager, audio, docker, etc)
extraGroups = ["wheel" "networkmanager" "audio" "video"]; extraGroups = ["wheel" "networkmanager" "audio" "video"];
}; };
}; };
# services # services
services = { services = {
mullvad-vpn.enable = true; blueman.enable = true;
mullvad-vpn.package = pkgs.mullvad-vpn; mullvad-vpn = {
enable = true;
package = pkgs.mullvad-vpn;
};
greetd = { greetd = {
enable = true; enable = true;
settings = { settings = {
@@ -190,8 +220,10 @@
}; };
pipewire = { pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa = {
alsa.support32Bit = true; enable = true;
support32Bit = true;
};
pulse.enable = true; pulse.enable = true;
# If you want to use JACK applications, uncomment this # If you want to use JACK applications, uncomment this
#jack.enable = true; #jack.enable = true;